interfaceservice

package
v0.0.0-...-4380e07 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Port_InterfaceDriver_name = map[int32]string{
	0: "NONE",
	1: "KERNEL",
	2: "USERSPACE",
}
View Source
var Port_InterfaceDriver_value = map[string]int32{
	"NONE":      0,
	"KERNEL":    1,
	"USERSPACE": 2,
}

Functions

func RegisterInterfaceServiceServer

func RegisterInterfaceServiceServer(s *grpc.Server, srv InterfaceServiceServer)

Types

type InterfaceServiceClient

type InterfaceServiceClient interface {
	// Get provides a list of ports available on selected host.
	Get(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Ports, error)
	// Attach triggers operation of attaching an interface to provided bridge.
	// It requires full definition of Ports.
	Attach(ctx context.Context, in *Ports, opts ...grpc.CallOption) (*empty.Empty, error)
	// Detach removes a port from a bridge. It requires PCI only.
	Detach(ctx context.Context, in *Ports, opts ...grpc.CallOption) (*empty.Empty, error)
}

InterfaceServiceClient is the client API for InterfaceService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewInterfaceServiceClient

func NewInterfaceServiceClient(cc *grpc.ClientConn) InterfaceServiceClient

type InterfaceServiceServer

type InterfaceServiceServer interface {
	// Get provides a list of ports available on selected host.
	Get(context.Context, *empty.Empty) (*Ports, error)
	// Attach triggers operation of attaching an interface to provided bridge.
	// It requires full definition of Ports.
	Attach(context.Context, *Ports) (*empty.Empty, error)
	// Detach removes a port from a bridge. It requires PCI only.
	Detach(context.Context, *Ports) (*empty.Empty, error)
}

InterfaceServiceServer is the server API for InterfaceService service.

type Port

type Port struct {
	Pci                  string               `protobuf:"bytes,1,opt,name=pci,proto3" json:"pci,omitempty"`
	Driver               Port_InterfaceDriver `protobuf:"varint,2,opt,name=driver,proto3,enum=openness.interfaceservice.Port_InterfaceDriver" json:"driver,omitempty"`
	Bridge               string               `protobuf:"bytes,3,opt,name=bridge,proto3" json:"bridge,omitempty"`
	MacAddress           string               `protobuf:"bytes,4,opt,name=macAddress,proto3" json:"macAddress,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Port defines a network interface available on the host. Port are typically kernel interfaces by default, and can be changed if the caller wishes to do so.

func (*Port) Descriptor

func (*Port) Descriptor() ([]byte, []int)

func (*Port) GetBridge

func (m *Port) GetBridge() string

func (*Port) GetDriver

func (m *Port) GetDriver() Port_InterfaceDriver

func (*Port) GetMacAddress

func (m *Port) GetMacAddress() string

func (*Port) GetPci

func (m *Port) GetPci() string

func (*Port) ProtoMessage

func (*Port) ProtoMessage()

func (*Port) Reset

func (m *Port) Reset()

func (*Port) String

func (m *Port) String() string

func (*Port) XXX_DiscardUnknown

func (m *Port) XXX_DiscardUnknown()

func (*Port) XXX_Marshal

func (m *Port) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Port) XXX_Merge

func (m *Port) XXX_Merge(src proto.Message)

func (*Port) XXX_Size

func (m *Port) XXX_Size() int

func (*Port) XXX_Unmarshal

func (m *Port) XXX_Unmarshal(b []byte) error

type Port_InterfaceDriver

type Port_InterfaceDriver int32
const (
	Port_NONE      Port_InterfaceDriver = 0
	Port_KERNEL    Port_InterfaceDriver = 1
	Port_USERSPACE Port_InterfaceDriver = 2
)

func (Port_InterfaceDriver) EnumDescriptor

func (Port_InterfaceDriver) EnumDescriptor() ([]byte, []int)

func (Port_InterfaceDriver) String

func (x Port_InterfaceDriver) String() string

type Ports

type Ports struct {
	Ports                []*Port  `protobuf:"bytes,1,rep,name=ports,proto3" json:"ports,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Ports) Descriptor

func (*Ports) Descriptor() ([]byte, []int)

func (*Ports) GetPorts

func (m *Ports) GetPorts() []*Port

func (*Ports) ProtoMessage

func (*Ports) ProtoMessage()

func (*Ports) Reset

func (m *Ports) Reset()

func (*Ports) String

func (m *Ports) String() string

func (*Ports) XXX_DiscardUnknown

func (m *Ports) XXX_DiscardUnknown()

func (*Ports) XXX_Marshal

func (m *Ports) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Ports) XXX_Merge

func (m *Ports) XXX_Merge(src proto.Message)

func (*Ports) XXX_Size

func (m *Ports) XXX_Size() int

func (*Ports) XXX_Unmarshal

func (m *Ports) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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