Documentation
¶
Index ¶
- Variables
- func RegisterInterfaceServiceServer(s *grpc.Server, srv InterfaceServiceServer)
- type InterfaceServiceClient
- type InterfaceServiceServer
- type Port
- func (*Port) Descriptor() ([]byte, []int)
- func (m *Port) GetBridge() string
- func (m *Port) GetDriver() Port_InterfaceDriver
- func (m *Port) GetMacAddress() string
- func (m *Port) GetPci() string
- func (*Port) ProtoMessage()
- func (m *Port) Reset()
- func (m *Port) String() string
- func (m *Port) XXX_DiscardUnknown()
- func (m *Port) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Port) XXX_Merge(src proto.Message)
- func (m *Port) XXX_Size() int
- func (m *Port) XXX_Unmarshal(b []byte) error
- type Port_InterfaceDriver
- type Ports
- func (*Ports) Descriptor() ([]byte, []int)
- func (m *Ports) GetPorts() []*Port
- func (*Ports) ProtoMessage()
- func (m *Ports) Reset()
- func (m *Ports) String() string
- func (m *Ports) XXX_DiscardUnknown()
- func (m *Ports) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Ports) XXX_Merge(src proto.Message)
- func (m *Ports) XXX_Size() int
- func (m *Ports) XXX_Unmarshal(b []byte) error
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) GetDriver ¶
func (m *Port) GetDriver() Port_InterfaceDriver
func (*Port) GetMacAddress ¶
func (*Port) ProtoMessage ¶
func (*Port) ProtoMessage()
func (*Port) XXX_DiscardUnknown ¶
func (m *Port) XXX_DiscardUnknown()
func (*Port) XXX_Unmarshal ¶
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) ProtoMessage ¶
func (*Ports) ProtoMessage()
func (*Ports) XXX_DiscardUnknown ¶
func (m *Ports) XXX_DiscardUnknown()
func (*Ports) XXX_Marshal ¶
func (*Ports) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.