Documentation
¶
Index ¶
- func RegisterSTNServer(s *grpc.Server, srv STNServer)
- type STNClient
- type STNReply
- func (*STNReply) Descriptor() ([]byte, []int)
- func (m *STNReply) GetError() string
- func (m *STNReply) GetIpAddresses() []string
- func (m *STNReply) GetKernelDriver() string
- func (m *STNReply) GetPciAddress() string
- func (m *STNReply) GetResult() uint32
- func (m *STNReply) GetRoutes() []*STNReply_Route
- func (*STNReply) ProtoMessage()
- func (m *STNReply) Reset()
- func (m *STNReply) String() string
- func (m *STNReply) XXX_DiscardUnknown()
- func (m *STNReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *STNReply) XXX_Merge(src proto.Message)
- func (m *STNReply) XXX_Size() int
- func (m *STNReply) XXX_Unmarshal(b []byte) error
- type STNReply_Route
- func (*STNReply_Route) Descriptor() ([]byte, []int)
- func (m *STNReply_Route) GetDestinationSubnet() string
- func (m *STNReply_Route) GetNextHopIp() string
- func (*STNReply_Route) ProtoMessage()
- func (m *STNReply_Route) Reset()
- func (m *STNReply_Route) String() string
- func (m *STNReply_Route) XXX_DiscardUnknown()
- func (m *STNReply_Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *STNReply_Route) XXX_Merge(src proto.Message)
- func (m *STNReply_Route) XXX_Size() int
- func (m *STNReply_Route) XXX_Unmarshal(b []byte) error
- type STNRequest
- func (*STNRequest) Descriptor() ([]byte, []int)
- func (m *STNRequest) GetDhcpEnabled() bool
- func (m *STNRequest) GetInterfaceName() string
- func (*STNRequest) ProtoMessage()
- func (m *STNRequest) Reset()
- func (m *STNRequest) String() string
- func (m *STNRequest) XXX_DiscardUnknown()
- func (m *STNRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *STNRequest) XXX_Merge(src proto.Message)
- func (m *STNRequest) XXX_Size() int
- func (m *STNRequest) XXX_Unmarshal(b []byte) error
- type STNServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type STNClient ¶
type STNClient interface {
// The request to steal (unconfigure) an interface identified by its name.
StealInterface(ctx context.Context, in *STNRequest, opts ...grpc.CallOption) (*STNReply, error)
// The request to revert config of a previously "stolen" (unconfigured) interface.
ReleaseInterface(ctx context.Context, in *STNRequest, opts ...grpc.CallOption) (*STNReply, error)
// Request to return information about the stolen interface.
StolenInterfaceInfo(ctx context.Context, in *STNRequest, opts ...grpc.CallOption) (*STNReply, error)
}
func NewSTNClient ¶
func NewSTNClient(cc *grpc.ClientConn) STNClient
type STNReply ¶
type STNReply struct {
// Result code. 0 = success, non-zero = error.
Result uint32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
// Error string in case that result != 0.
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
// PCI address of the interface.
PciAddress string `protobuf:"bytes,3,opt,name=pci_address,json=pciAddress,proto3" json:"pci_address,omitempty"`
// List of IP addresses assigned to the interface.
IpAddresses []string `protobuf:"bytes,4,rep,name=ip_addresses,json=ipAddresses" json:"ip_addresses,omitempty"`
// List of routes related to the interface.
Routes []*STNReply_Route `protobuf:"bytes,5,rep,name=routes" json:"routes,omitempty"`
// Kernel driver used by this interface before stealing.
KernelDriver string `protobuf:"bytes,6,opt,name=kernel_driver,json=kernelDriver,proto3" json:"kernel_driver,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
The reply to the STNRequest. Contains the original config of the stolen interface.
func (*STNReply) GetRoutes ¶
func (m *STNReply) GetRoutes() []*STNReply_Route
func (*STNReply) XXX_Marshal ¶ added in v1.4.0
type STNReply_Route ¶
type STNReply_Route struct {
// Destination subnet prefix.
DestinationSubnet string `protobuf:"bytes,1,opt,name=destination_subnet,json=destinationSubnet,proto3" json:"destination_subnet,omitempty"`
// Next hop IP address.
NextHopIp string `protobuf:"bytes,2,opt,name=next_hop_ip,json=nextHopIp,proto3" json:"next_hop_ip,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
A route related to the interface.
func (*STNReply_Route) Descriptor ¶
func (*STNReply_Route) Descriptor() ([]byte, []int)
func (*STNReply_Route) GetDestinationSubnet ¶
func (m *STNReply_Route) GetDestinationSubnet() string
func (*STNReply_Route) GetNextHopIp ¶
func (m *STNReply_Route) GetNextHopIp() string
func (*STNReply_Route) ProtoMessage ¶
func (*STNReply_Route) ProtoMessage()
func (*STNReply_Route) Reset ¶
func (m *STNReply_Route) Reset()
func (*STNReply_Route) String ¶
func (m *STNReply_Route) String() string
func (*STNReply_Route) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *STNReply_Route) XXX_DiscardUnknown()
func (*STNReply_Route) XXX_Marshal ¶ added in v1.4.0
func (m *STNReply_Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*STNReply_Route) XXX_Merge ¶ added in v1.4.0
func (dst *STNReply_Route) XXX_Merge(src proto.Message)
func (*STNReply_Route) XXX_Size ¶ added in v1.4.0
func (m *STNReply_Route) XXX_Size() int
func (*STNReply_Route) XXX_Unmarshal ¶ added in v1.4.0
func (m *STNReply_Route) XXX_Unmarshal(b []byte) error
type STNRequest ¶
type STNRequest struct {
// The interface to be stolen / released.
InterfaceName string `protobuf:"bytes,1,opt,name=interface_name,json=interfaceName,proto3" json:"interface_name,omitempty"`
// True if DHCP is enabled on the interface.
DhcpEnabled bool `protobuf:"varint,2,opt,name=dhcp_enabled,json=dhcpEnabled,proto3" json:"dhcp_enabled,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
STNRequest represents a request to steal or release of an interface.
func (*STNRequest) Descriptor ¶
func (*STNRequest) Descriptor() ([]byte, []int)
func (*STNRequest) GetDhcpEnabled ¶
func (m *STNRequest) GetDhcpEnabled() bool
func (*STNRequest) GetInterfaceName ¶
func (m *STNRequest) GetInterfaceName() string
func (*STNRequest) ProtoMessage ¶
func (*STNRequest) ProtoMessage()
func (*STNRequest) Reset ¶
func (m *STNRequest) Reset()
func (*STNRequest) String ¶
func (m *STNRequest) String() string
func (*STNRequest) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *STNRequest) XXX_DiscardUnknown()
func (*STNRequest) XXX_Marshal ¶ added in v1.4.0
func (m *STNRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*STNRequest) XXX_Merge ¶ added in v1.4.0
func (dst *STNRequest) XXX_Merge(src proto.Message)
func (*STNRequest) XXX_Size ¶ added in v1.4.0
func (m *STNRequest) XXX_Size() int
func (*STNRequest) XXX_Unmarshal ¶ added in v1.4.0
func (m *STNRequest) XXX_Unmarshal(b []byte) error
type STNServer ¶
type STNServer interface {
// The request to steal (unconfigure) an interface identified by its name.
StealInterface(context.Context, *STNRequest) (*STNReply, error)
// The request to revert config of a previously "stolen" (unconfigured) interface.
ReleaseInterface(context.Context, *STNRequest) (*STNReply, error)
// Request to return information about the stolen interface.
StolenInterfaceInfo(context.Context, *STNRequest) (*STNReply, error)
}
Source Files
¶
- stn.pb.go
Click to show internal directories.
Click to hide internal directories.