moactld

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

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 AddLinkRequest

type AddLinkRequest struct {
	EmulationId          int32    `protobuf:"varint,1,opt,name=emulation_id,json=emulationId,proto3" json:"emulation_id,omitempty"`
	Tags                 []string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"`
	LinkBlob             string   `protobuf:"bytes,3,opt,name=link_blob,json=linkBlob,proto3" json:"link_blob,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

configure a link

func (*AddLinkRequest) Descriptor

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

func (*AddLinkRequest) GetEmulationId

func (m *AddLinkRequest) GetEmulationId() int32

func (*AddLinkRequest) GetLinkBlob

func (m *AddLinkRequest) GetLinkBlob() string

func (*AddLinkRequest) GetTags

func (m *AddLinkRequest) GetTags() []string

func (*AddLinkRequest) ProtoMessage

func (*AddLinkRequest) ProtoMessage()

func (*AddLinkRequest) Reset

func (m *AddLinkRequest) Reset()

func (*AddLinkRequest) String

func (m *AddLinkRequest) String() string

func (*AddLinkRequest) XXX_DiscardUnknown

func (m *AddLinkRequest) XXX_DiscardUnknown()

func (*AddLinkRequest) XXX_Marshal

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

func (*AddLinkRequest) XXX_Merge

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

func (*AddLinkRequest) XXX_Size

func (m *AddLinkRequest) XXX_Size() int

func (*AddLinkRequest) XXX_Unmarshal

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

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"`
	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) 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 MoaControlClient

type MoaControlClient interface {
	Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*MoaControlResponse, error)
	AddLink(ctx context.Context, in *AddLinkRequest, opts ...grpc.CallOption) (*MoaControlResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*MoaControlResponse, 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

MoaControlServer is the server API for MoaControl service.

type UnimplementedMoaControlServer

type UnimplementedMoaControlServer struct {
}

UnimplementedMoaControlServer can be embedded to have forward compatible implementations.

func (*UnimplementedMoaControlServer) Init

func (*UnimplementedMoaControlServer) Update

type UpdateRequest

type UpdateRequest struct {
	Tag                  string   `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	Param                string   `protobuf:"bytes,2,opt,name=param,proto3" json:"param,omitempty"`
	Value                string   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,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) GetParam

func (m *UpdateRequest) GetParam() string

func (*UpdateRequest) GetTag

func (m *UpdateRequest) GetTag() string

func (*UpdateRequest) GetValue

func (m *UpdateRequest) GetValue() 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

Jump to

Keyboard shortcuts

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