channel

package
v2.5.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ch Channel) error

Serve run i/o on channel

Types

type Channel

type Channel interface {
	Open() error
	Close() error
	Reset() error
	Read([]byte) (int, error)
	Write([]byte) (int, error)
	Poll() error
}

Channel interface provide communication channel with cloudagent

type VirtioChannel

type VirtioChannel struct {
	// contains filtered or unexported fields
}

VirtioChannel struct

func NewVirtioChannel

func NewVirtioChannel(path string) (*VirtioChannel, error)

NewVirtioChannel creates new virtio channel

func (*VirtioChannel) Close

func (ch *VirtioChannel) Close() error

Close close channel

func (*VirtioChannel) Open

func (ch *VirtioChannel) Open() error

Open open channel

func (*VirtioChannel) Poll

func (ch *VirtioChannel) Poll() error

Poll channel for new messages

func (*VirtioChannel) Read

func (ch *VirtioChannel) Read(b []byte) (int, error)

Read read from channel

func (*VirtioChannel) Reset

func (ch *VirtioChannel) Reset() error

Reset rests channel

func (*VirtioChannel) Write

func (ch *VirtioChannel) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL