Documentation
¶
Index ¶
- func Dial(proxy net.Conn, network string, addr string) (net.Conn, error)
- func DialUDP(client *rpc.Client, network string, laddr *net.UDPAddr, raddr *net.UDPAddr) (net.PacketConn, error)
- func GuestClock(ctx context.Context, conn net.Conn, interval time.Duration, ...)
- func HostClock(conn net.Conn)
- func ListenUDP(client *rpc.Client, network string, laddr *net.UDPAddr) (net.PacketConn, error)
- func NewEmitter(w io.WriteCloser, bufsize int) chan<- LogEvent
- func NewEmitterWriter(emitter chan<- LogEvent, name string, method LogMethod) io.Writer
- func NewReceiver(r io.ReadCloser, bufsize int) <-chan LogEvent
- func ServeDatagramProxy(conn net.Conn)
- func ServeGuestAPI(g Guest, conn io.ReadWriteCloser) error
- func ServeStreamProxy(conn net.Conn)
- type Command
- type CommandOutput
- type DHCPResponse
- type Datagram
- type DatagramClient
- func (d *DatagramClient) Close() error
- func (d *DatagramClient) LocalAddr() net.Addr
- func (d *DatagramClient) Read(size int) ([]byte, net.Addr, error)
- func (d *DatagramClient) ReadFrom(b []byte) (int, net.Addr, error)
- func (d *DatagramClient) SetDeadline(t time.Time) error
- func (d *DatagramClient) SetReadDeadline(t time.Time) error
- func (d *DatagramClient) SetWriteDeadline(t time.Time) error
- func (d *DatagramClient) WriteTo(b []byte, addr net.Addr) (int, error)
- type DatagramProxy
- func (d *DatagramProxy) Close(_ struct{}, _ *struct{}) error
- func (d *DatagramProxy) Dial(spec DatagramSpec, _ *struct{}) error
- func (d *DatagramProxy) Listen(spec DatagramSpec, _ *struct{}) error
- func (d *DatagramProxy) Read(size int, out *Datagram) error
- func (d *DatagramProxy) SetDeadline(t time.Time, _ *struct{}) (err error)
- func (d *DatagramProxy) SetReadDeadline(t time.Time, _ *struct{}) (err error)
- func (d *DatagramProxy) SetWriteDeadline(t time.Time, _ *struct{}) (err error)
- func (d *DatagramProxy) Write(datagram Datagram, _ *struct{}) (err error)
- type DatagramSpec
- type Guest
- type GuestClient
- func (c *GuestClient) DHCP(_ struct{}, out *DHCPResponse) error
- func (c *GuestClient) GC(_ struct{}, _ *struct{}) error
- func (c *GuestClient) Init(req InitRequest, _ *struct{}) error
- func (c *GuestClient) Launch(req Command, out *int64) error
- func (c *GuestClient) Listen(req ListenRequest, _ *struct{}) error
- func (c *GuestClient) Metrics(req []string, out *event.Metrics) error
- func (c *GuestClient) Mkdir(path string, _ *struct{}) error
- func (c *GuestClient) Mount(req MountRequest, _ *struct{}) error
- func (c *GuestClient) Release(req string, _ *struct{}) error
- func (c *GuestClient) Run(req Command, out *CommandOutput) error
- func (c *GuestClient) Shutdown(_ struct{}, _ *struct{}) error
- func (c *GuestClient) Signal(req SignalRequest, _ *struct{}) error
- func (c *GuestClient) Wait(req string, out *int) error
- func (c *GuestClient) Write(req WriteRequest, _ *struct{}) error
- type InitRequest
- type ListenRequest
- type LogEvent
- type LogMethod
- type MountRequest
- type SignalRequest
- type WriteRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GuestClock ¶
func NewEmitter ¶
func NewEmitter(w io.WriteCloser, bufsize int) chan<- LogEvent
func NewEmitterWriter ¶
func NewReceiver ¶
func NewReceiver(r io.ReadCloser, bufsize int) <-chan LogEvent
func ServeDatagramProxy ¶
func ServeGuestAPI ¶
func ServeGuestAPI(g Guest, conn io.ReadWriteCloser) error
The guest API only runs on one connection per VM
func ServeStreamProxy ¶
Types ¶
type CommandOutput ¶
type DHCPResponse ¶
type DatagramClient ¶
type DatagramClient struct {
// contains filtered or unexported fields
}
func ListenUnix ¶
func (*DatagramClient) Close ¶
func (d *DatagramClient) Close() error
func (*DatagramClient) LocalAddr ¶
func (d *DatagramClient) LocalAddr() net.Addr
func (*DatagramClient) SetDeadline ¶
func (d *DatagramClient) SetDeadline(t time.Time) error
func (*DatagramClient) SetReadDeadline ¶
func (d *DatagramClient) SetReadDeadline(t time.Time) error
func (*DatagramClient) SetWriteDeadline ¶
func (d *DatagramClient) SetWriteDeadline(t time.Time) error
type DatagramProxy ¶
type DatagramProxy struct {
// contains filtered or unexported fields
}
func (*DatagramProxy) Close ¶
func (d *DatagramProxy) Close(_ struct{}, _ *struct{}) error
func (*DatagramProxy) Dial ¶
func (d *DatagramProxy) Dial(spec DatagramSpec, _ *struct{}) error
func (*DatagramProxy) Listen ¶
func (d *DatagramProxy) Listen(spec DatagramSpec, _ *struct{}) error
func (*DatagramProxy) SetDeadline ¶
func (d *DatagramProxy) SetDeadline(t time.Time, _ *struct{}) (err error)
func (*DatagramProxy) SetReadDeadline ¶
func (d *DatagramProxy) SetReadDeadline(t time.Time, _ *struct{}) (err error)
func (*DatagramProxy) SetWriteDeadline ¶
func (d *DatagramProxy) SetWriteDeadline(t time.Time, _ *struct{}) (err error)
func (*DatagramProxy) Write ¶
func (d *DatagramProxy) Write(datagram Datagram, _ *struct{}) (err error)
type DatagramSpec ¶
type Guest ¶
type Guest interface {
// Init... initialize the guest
Init(InitRequest, *struct{}) error
// DHCP... start DHCPv4 on the main network interface
DHCP(struct{}, *DHCPResponse) error
// Write... overwrite/create a file
Write(WriteRequest, *struct{}) error
// Mkdir... create a directory, including parents
Mkdir(string, *struct{}) error
// Mount... mount a filesystem
Mount(MountRequest, *struct{}) error
// Run... execute a command synchronously
Run(Command, *CommandOutput) error
// Launch... execute a command asynchronously, output sent to event stream
Launch(Command, *int64) error
// Wait... wait for a service to exit
Wait(string, *int) error
// Release... release a service without calling Wait
Release(string, *struct{}) error
// Listen... listen on a network address
Listen(ListenRequest, *struct{}) error
// Signal... send a signal to a process
Signal(SignalRequest, *struct{}) error
// Metrics... get system metrics
Metrics([]string, *event.Metrics) error
// Shutdown... initiate shutdown
Shutdown(struct{}, *struct{}) error
// GC... run garbage collection
GC(struct{}, *struct{}) error
}
func NewGuestClient ¶
type GuestClient ¶
func (*GuestClient) DHCP ¶
func (c *GuestClient) DHCP(_ struct{}, out *DHCPResponse) error
func (*GuestClient) GC ¶
func (c *GuestClient) GC(_ struct{}, _ *struct{}) error
func (*GuestClient) Init ¶
func (c *GuestClient) Init(req InitRequest, _ *struct{}) error
func (*GuestClient) Listen ¶
func (c *GuestClient) Listen(req ListenRequest, _ *struct{}) error
func (*GuestClient) Mkdir ¶
func (c *GuestClient) Mkdir(path string, _ *struct{}) error
func (*GuestClient) Mount ¶
func (c *GuestClient) Mount(req MountRequest, _ *struct{}) error
func (*GuestClient) Release ¶
func (c *GuestClient) Release(req string, _ *struct{}) error
func (*GuestClient) Run ¶
func (c *GuestClient) Run(req Command, out *CommandOutput) error
func (*GuestClient) Shutdown ¶
func (c *GuestClient) Shutdown(_ struct{}, _ *struct{}) error
func (*GuestClient) Signal ¶
func (c *GuestClient) Signal(req SignalRequest, _ *struct{}) error
func (*GuestClient) Write ¶
func (c *GuestClient) Write(req WriteRequest, _ *struct{}) error
type InitRequest ¶
type ListenRequest ¶
type MountRequest ¶
type SignalRequest ¶
type WriteRequest ¶
Click to show internal directories.
Click to hide internal directories.