Documentation ¶
Index ¶
- Constants
- func RegisterMoaControlServer(s *grpc.Server, srv MoaControlServer)
- func WithMoaControl(endpoint string, f func(MoaControlClient) error) error
- type InitRequest
- func (*InitRequest) Descriptor() ([]byte, []int)
- func (m *InitRequest) GetEmulationHost() string
- func (m *InitRequest) GetEmulationId() int32
- func (m *InitRequest) GetEmulationPort() int32
- func (*InitRequest) ProtoMessage()
- func (m *InitRequest) Reset()
- func (m *InitRequest) String() string
- func (m *InitRequest) XXX_DiscardUnknown()
- func (m *InitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InitRequest) XXX_Merge(src proto.Message)
- func (m *InitRequest) XXX_Size() int
- func (m *InitRequest) XXX_Unmarshal(b []byte) error
- type LinkInfo
- func (*LinkInfo) Descriptor() ([]byte, []int)
- func (m *LinkInfo) GetExpNodes() []string
- func (m *LinkInfo) GetParams() *LinkParams
- func (m *LinkInfo) GetTags() []string
- func (*LinkInfo) ProtoMessage()
- func (m *LinkInfo) Reset()
- func (m *LinkInfo) String() string
- func (m *LinkInfo) XXX_DiscardUnknown()
- func (m *LinkInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LinkInfo) XXX_Merge(src proto.Message)
- func (m *LinkInfo) XXX_Size() int
- func (m *LinkInfo) XXX_Unmarshal(b []byte) error
- type LinkParams
- func (*LinkParams) Descriptor() ([]byte, []int)
- func (m *LinkParams) GetCapacity() int64
- func (m *LinkParams) GetLatency() int32
- func (m *LinkParams) GetLoss() float32
- func (*LinkParams) ProtoMessage()
- func (m *LinkParams) Reset()
- func (m *LinkParams) String() string
- func (m *LinkParams) XXX_DiscardUnknown()
- func (m *LinkParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LinkParams) XXX_Merge(src proto.Message)
- func (m *LinkParams) XXX_Size() int
- func (m *LinkParams) XXX_Unmarshal(b []byte) error
- type MoaControlClient
- type MoaControlResponse
- func (*MoaControlResponse) Descriptor() ([]byte, []int)
- func (*MoaControlResponse) ProtoMessage()
- func (m *MoaControlResponse) Reset()
- func (m *MoaControlResponse) String() string
- func (m *MoaControlResponse) XXX_DiscardUnknown()
- func (m *MoaControlResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MoaControlResponse) XXX_Merge(src proto.Message)
- func (m *MoaControlResponse) XXX_Size() int
- func (m *MoaControlResponse) XXX_Unmarshal(b []byte) error
- type MoaControlServer
- type ShowRequest
- func (*ShowRequest) Descriptor() ([]byte, []int)
- func (*ShowRequest) ProtoMessage()
- func (m *ShowRequest) Reset()
- func (m *ShowRequest) String() string
- func (m *ShowRequest) XXX_DiscardUnknown()
- func (m *ShowRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShowRequest) XXX_Merge(src proto.Message)
- func (m *ShowRequest) XXX_Size() int
- func (m *ShowRequest) XXX_Unmarshal(b []byte) error
- type ShowResponse
- func (*ShowResponse) Descriptor() ([]byte, []int)
- func (m *ShowResponse) GetLinks() []*LinkInfo
- func (*ShowResponse) ProtoMessage()
- func (m *ShowResponse) Reset()
- func (m *ShowResponse) String() string
- func (m *ShowResponse) XXX_DiscardUnknown()
- func (m *ShowResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShowResponse) XXX_Merge(src proto.Message)
- func (m *ShowResponse) XXX_Size() int
- func (m *ShowResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedMoaControlServer
- func (*UnimplementedMoaControlServer) Init(ctx context.Context, req *InitRequest) (*MoaControlResponse, error)
- func (*UnimplementedMoaControlServer) Show(ctx context.Context, req *ShowRequest) (*ShowResponse, error)
- func (*UnimplementedMoaControlServer) Update(ctx context.Context, req *UpdateRequest) (*MoaControlResponse, error)
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)
- func (m *UpdateRequest) GetCapacity() int64
- func (m *UpdateRequest) GetEnforceLoss() bool
- func (m *UpdateRequest) GetLatency() int32
- func (m *UpdateRequest) GetLoss() float32
- func (m *UpdateRequest) GetTags() []string
- func (*UpdateRequest) ProtoMessage()
- func (m *UpdateRequest) Reset()
- func (m *UpdateRequest) String() string
- func (m *UpdateRequest) XXX_DiscardUnknown()
- func (m *UpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdateRequest) XXX_Merge(src proto.Message)
- func (m *UpdateRequest) XXX_Size() int
- func (m *UpdateRequest) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( // where to find the auth token AuthTokenPath = "/etc/moa/token" // the tcp port that moactld listens on ControlPort = 15000 )
Variables ¶
This section is empty.
Functions ¶
func RegisterMoaControlServer ¶
func RegisterMoaControlServer(s *grpc.Server, srv MoaControlServer)
func WithMoaControl ¶
func WithMoaControl(endpoint string, f func(MoaControlClient) error) error
Types ¶
type InitRequest ¶
type InitRequest struct { EmulationHost string `protobuf:"bytes,1,opt,name=emulation_host,json=emulationHost,proto3" json:"emulation_host,omitempty"` EmulationPort int32 `protobuf:"varint,2,opt,name=emulation_port,json=emulationPort,proto3" json:"emulation_port,omitempty"` EmulationId int32 `protobuf:"varint,3,opt,name=emulation_id,json=emulationId,proto3" json:"emulation_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
initialization
func (*InitRequest) Descriptor ¶
func (*InitRequest) Descriptor() ([]byte, []int)
func (*InitRequest) GetEmulationHost ¶
func (m *InitRequest) GetEmulationHost() string
func (*InitRequest) GetEmulationId ¶ added in v0.2.0
func (m *InitRequest) GetEmulationId() int32
func (*InitRequest) GetEmulationPort ¶
func (m *InitRequest) GetEmulationPort() int32
func (*InitRequest) ProtoMessage ¶
func (*InitRequest) ProtoMessage()
func (*InitRequest) Reset ¶
func (m *InitRequest) Reset()
func (*InitRequest) String ¶
func (m *InitRequest) String() string
func (*InitRequest) XXX_DiscardUnknown ¶
func (m *InitRequest) XXX_DiscardUnknown()
func (*InitRequest) XXX_Marshal ¶
func (m *InitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InitRequest) XXX_Merge ¶
func (m *InitRequest) XXX_Merge(src proto.Message)
func (*InitRequest) XXX_Size ¶
func (m *InitRequest) XXX_Size() int
func (*InitRequest) XXX_Unmarshal ¶
func (m *InitRequest) XXX_Unmarshal(b []byte) error
type LinkInfo ¶ added in v0.2.0
type LinkInfo struct { ExpNodes []string `protobuf:"bytes,1,rep,name=exp_nodes,json=expNodes,proto3" json:"exp_nodes,omitempty"` Params *LinkParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LinkInfo) Descriptor ¶ added in v0.2.0
func (*LinkInfo) GetExpNodes ¶ added in v0.2.0
func (*LinkInfo) GetParams ¶ added in v0.2.0
func (m *LinkInfo) GetParams() *LinkParams
func (*LinkInfo) ProtoMessage ¶ added in v0.2.0
func (*LinkInfo) ProtoMessage()
func (*LinkInfo) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *LinkInfo) XXX_DiscardUnknown()
func (*LinkInfo) XXX_Marshal ¶ added in v0.2.0
func (*LinkInfo) XXX_Unmarshal ¶ added in v0.2.0
type LinkParams ¶ added in v0.2.0
type LinkParams struct { Capacity int64 `protobuf:"varint,1,opt,name=capacity,proto3" json:"capacity,omitempty"` Latency int32 `protobuf:"varint,2,opt,name=latency,proto3" json:"latency,omitempty"` Loss float32 `protobuf:"fixed32,3,opt,name=loss,proto3" json:"loss,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LinkParams) Descriptor ¶ added in v0.2.0
func (*LinkParams) Descriptor() ([]byte, []int)
func (*LinkParams) GetCapacity ¶ added in v0.2.0
func (m *LinkParams) GetCapacity() int64
func (*LinkParams) GetLatency ¶ added in v0.2.0
func (m *LinkParams) GetLatency() int32
func (*LinkParams) GetLoss ¶ added in v0.2.0
func (m *LinkParams) GetLoss() float32
func (*LinkParams) ProtoMessage ¶ added in v0.2.0
func (*LinkParams) ProtoMessage()
func (*LinkParams) Reset ¶ added in v0.2.0
func (m *LinkParams) Reset()
func (*LinkParams) String ¶ added in v0.2.0
func (m *LinkParams) String() string
func (*LinkParams) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *LinkParams) XXX_DiscardUnknown()
func (*LinkParams) XXX_Marshal ¶ added in v0.2.0
func (m *LinkParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LinkParams) XXX_Merge ¶ added in v0.2.0
func (m *LinkParams) XXX_Merge(src proto.Message)
func (*LinkParams) XXX_Size ¶ added in v0.2.0
func (m *LinkParams) XXX_Size() int
func (*LinkParams) XXX_Unmarshal ¶ added in v0.2.0
func (m *LinkParams) XXX_Unmarshal(b []byte) error
type MoaControlClient ¶
type MoaControlClient interface { Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*MoaControlResponse, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*MoaControlResponse, error) Show(ctx context.Context, in *ShowRequest, opts ...grpc.CallOption) (*ShowResponse, error) }
MoaControlClient is the client API for MoaControl service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMoaControlClient ¶
func NewMoaControlClient(cc *grpc.ClientConn) MoaControlClient
type MoaControlResponse ¶
type MoaControlResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MoaControlResponse) Descriptor ¶
func (*MoaControlResponse) Descriptor() ([]byte, []int)
func (*MoaControlResponse) ProtoMessage ¶
func (*MoaControlResponse) ProtoMessage()
func (*MoaControlResponse) Reset ¶
func (m *MoaControlResponse) Reset()
func (*MoaControlResponse) String ¶
func (m *MoaControlResponse) String() string
func (*MoaControlResponse) XXX_DiscardUnknown ¶
func (m *MoaControlResponse) XXX_DiscardUnknown()
func (*MoaControlResponse) XXX_Marshal ¶
func (m *MoaControlResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MoaControlResponse) XXX_Merge ¶
func (m *MoaControlResponse) XXX_Merge(src proto.Message)
func (*MoaControlResponse) XXX_Size ¶
func (m *MoaControlResponse) XXX_Size() int
func (*MoaControlResponse) XXX_Unmarshal ¶
func (m *MoaControlResponse) XXX_Unmarshal(b []byte) error
type MoaControlServer ¶
type MoaControlServer interface { Init(context.Context, *InitRequest) (*MoaControlResponse, error) Update(context.Context, *UpdateRequest) (*MoaControlResponse, error) Show(context.Context, *ShowRequest) (*ShowResponse, error) }
MoaControlServer is the server API for MoaControl service.
type ShowRequest ¶ added in v0.2.0
type ShowRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ShowRequest) Descriptor ¶ added in v0.2.0
func (*ShowRequest) Descriptor() ([]byte, []int)
func (*ShowRequest) ProtoMessage ¶ added in v0.2.0
func (*ShowRequest) ProtoMessage()
func (*ShowRequest) Reset ¶ added in v0.2.0
func (m *ShowRequest) Reset()
func (*ShowRequest) String ¶ added in v0.2.0
func (m *ShowRequest) String() string
func (*ShowRequest) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *ShowRequest) XXX_DiscardUnknown()
func (*ShowRequest) XXX_Marshal ¶ added in v0.2.0
func (m *ShowRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShowRequest) XXX_Merge ¶ added in v0.2.0
func (m *ShowRequest) XXX_Merge(src proto.Message)
func (*ShowRequest) XXX_Size ¶ added in v0.2.0
func (m *ShowRequest) XXX_Size() int
func (*ShowRequest) XXX_Unmarshal ¶ added in v0.2.0
func (m *ShowRequest) XXX_Unmarshal(b []byte) error
type ShowResponse ¶ added in v0.2.0
type ShowResponse struct { Links []*LinkInfo `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ShowResponse) Descriptor ¶ added in v0.2.0
func (*ShowResponse) Descriptor() ([]byte, []int)
func (*ShowResponse) GetLinks ¶ added in v0.2.0
func (m *ShowResponse) GetLinks() []*LinkInfo
func (*ShowResponse) ProtoMessage ¶ added in v0.2.0
func (*ShowResponse) ProtoMessage()
func (*ShowResponse) Reset ¶ added in v0.2.0
func (m *ShowResponse) Reset()
func (*ShowResponse) String ¶ added in v0.2.0
func (m *ShowResponse) String() string
func (*ShowResponse) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *ShowResponse) XXX_DiscardUnknown()
func (*ShowResponse) XXX_Marshal ¶ added in v0.2.0
func (m *ShowResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShowResponse) XXX_Merge ¶ added in v0.2.0
func (m *ShowResponse) XXX_Merge(src proto.Message)
func (*ShowResponse) XXX_Size ¶ added in v0.2.0
func (m *ShowResponse) XXX_Size() int
func (*ShowResponse) XXX_Unmarshal ¶ added in v0.2.0
func (m *ShowResponse) XXX_Unmarshal(b []byte) error
type UnimplementedMoaControlServer ¶
type UnimplementedMoaControlServer struct { }
UnimplementedMoaControlServer can be embedded to have forward compatible implementations.
func (*UnimplementedMoaControlServer) Init ¶
func (*UnimplementedMoaControlServer) Init(ctx context.Context, req *InitRequest) (*MoaControlResponse, error)
func (*UnimplementedMoaControlServer) Show ¶ added in v0.2.0
func (*UnimplementedMoaControlServer) Show(ctx context.Context, req *ShowRequest) (*ShowResponse, error)
func (*UnimplementedMoaControlServer) Update ¶
func (*UnimplementedMoaControlServer) Update(ctx context.Context, req *UpdateRequest) (*MoaControlResponse, error)
type UpdateRequest ¶
type UpdateRequest struct { Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` Capacity int64 `protobuf:"varint,2,opt,name=capacity,proto3" json:"capacity,omitempty"` Latency int32 `protobuf:"varint,3,opt,name=latency,proto3" json:"latency,omitempty"` Loss float32 `protobuf:"fixed32,4,opt,name=loss,proto3" json:"loss,omitempty"` EnforceLoss bool `protobuf:"varint,5,opt,name=enforce_loss,json=enforceLoss,proto3" json:"enforce_loss,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
dynamic configuration request
func (*UpdateRequest) Descriptor ¶
func (*UpdateRequest) Descriptor() ([]byte, []int)
func (*UpdateRequest) GetCapacity ¶ added in v0.2.0
func (m *UpdateRequest) GetCapacity() int64
func (*UpdateRequest) GetEnforceLoss ¶ added in v0.2.0
func (m *UpdateRequest) GetEnforceLoss() bool
func (*UpdateRequest) GetLatency ¶ added in v0.2.0
func (m *UpdateRequest) GetLatency() int32
func (*UpdateRequest) GetLoss ¶ added in v0.2.0
func (m *UpdateRequest) GetLoss() float32
func (*UpdateRequest) GetTags ¶ added in v0.2.0
func (m *UpdateRequest) GetTags() []string
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) Reset ¶
func (m *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (m *UpdateRequest) String() string
func (*UpdateRequest) XXX_DiscardUnknown ¶
func (m *UpdateRequest) XXX_DiscardUnknown()
func (*UpdateRequest) XXX_Marshal ¶
func (m *UpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateRequest) XXX_Merge ¶
func (m *UpdateRequest) XXX_Merge(src proto.Message)
func (*UpdateRequest) XXX_Size ¶
func (m *UpdateRequest) XXX_Size() int
func (*UpdateRequest) XXX_Unmarshal ¶
func (m *UpdateRequest) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.