api

package
v0.0.0-...-2a802d5 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterConfigServer

func RegisterConfigServer(s *grpc.Server, srv ConfigServer)

func RegisterNodeServer

func RegisterNodeServer(s *grpc.Server, srv NodeServer)

func RegisterProcessInitServer

func RegisterProcessInitServer(s *grpc.Server, srv ProcessInitServer)

func RegisterSubscribeServer

func RegisterSubscribeServer(s *grpc.Server, srv SubscribeServer)

Types

type AllGroupOrNode

type AllGroupOrNode struct {
	Value                []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AllGroupOrNode) Descriptor

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

func (*AllGroupOrNode) GetValue

func (m *AllGroupOrNode) GetValue() []string

func (*AllGroupOrNode) ProtoMessage

func (*AllGroupOrNode) ProtoMessage()

func (*AllGroupOrNode) Reset

func (m *AllGroupOrNode) Reset()

func (*AllGroupOrNode) String

func (m *AllGroupOrNode) String() string

func (*AllGroupOrNode) XXX_DiscardUnknown

func (m *AllGroupOrNode) XXX_DiscardUnknown()

func (*AllGroupOrNode) XXX_Marshal

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

func (*AllGroupOrNode) XXX_Merge

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

func (*AllGroupOrNode) XXX_Size

func (m *AllGroupOrNode) XXX_Size() int

func (*AllGroupOrNode) XXX_Unmarshal

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

type ConfigClient

type ConfigClient interface {
	GetConfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*config.Setting, error)
	SetConfig(ctx context.Context, in *config.Setting, opts ...grpc.CallOption) (*empty.Empty, error)
	ReimportRule(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	GetRate(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Config_GetRateClient, error)
}

ConfigClient is the client API for Config service.

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

func NewConfigClient

func NewConfigClient(cc grpc.ClientConnInterface) ConfigClient

type ConfigServer

type ConfigServer interface {
	GetConfig(context.Context, *empty.Empty) (*config.Setting, error)
	SetConfig(context.Context, *config.Setting) (*empty.Empty, error)
	ReimportRule(context.Context, *empty.Empty) (*empty.Empty, error)
	GetRate(*empty.Empty, Config_GetRateServer) error
}

ConfigServer is the server API for Config service.

type Config_GetRateClient

type Config_GetRateClient interface {
	Recv() (*DaUaDrUr, error)
	grpc.ClientStream
}

type Config_GetRateServer

type Config_GetRateServer interface {
	Send(*DaUaDrUr) error
	grpc.ServerStream
}

type DaUaDrUr

type DaUaDrUr struct {
	Download             string   `protobuf:"bytes,1,opt,name=Download,proto3" json:"Download,omitempty"`
	Upload               string   `protobuf:"bytes,2,opt,name=Upload,proto3" json:"Upload,omitempty"`
	DownRate             string   `protobuf:"bytes,3,opt,name=DownRate,proto3" json:"DownRate,omitempty"`
	UpRate               string   `protobuf:"bytes,4,opt,name=UpRate,proto3" json:"UpRate,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DaUaDrUr) Descriptor

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

func (*DaUaDrUr) GetDownRate

func (m *DaUaDrUr) GetDownRate() string

func (*DaUaDrUr) GetDownload

func (m *DaUaDrUr) GetDownload() string

func (*DaUaDrUr) GetUpRate

func (m *DaUaDrUr) GetUpRate() string

func (*DaUaDrUr) GetUpload

func (m *DaUaDrUr) GetUpload() string

func (*DaUaDrUr) ProtoMessage

func (*DaUaDrUr) ProtoMessage()

func (*DaUaDrUr) Reset

func (m *DaUaDrUr) Reset()

func (*DaUaDrUr) String

func (m *DaUaDrUr) String() string

func (*DaUaDrUr) XXX_DiscardUnknown

func (m *DaUaDrUr) XXX_DiscardUnknown()

func (*DaUaDrUr) XXX_Marshal

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

func (*DaUaDrUr) XXX_Merge

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

func (*DaUaDrUr) XXX_Size

func (m *DaUaDrUr) XXX_Size() int

func (*DaUaDrUr) XXX_Unmarshal

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

type GroupAndNode

type GroupAndNode struct {
	Group                string   `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	Node                 string   `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GroupAndNode) Descriptor

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

func (*GroupAndNode) GetGroup

func (m *GroupAndNode) GetGroup() string

func (*GroupAndNode) GetNode

func (m *GroupAndNode) GetNode() string

func (*GroupAndNode) ProtoMessage

func (*GroupAndNode) ProtoMessage()

func (*GroupAndNode) Reset

func (m *GroupAndNode) Reset()

func (*GroupAndNode) String

func (m *GroupAndNode) String() string

func (*GroupAndNode) XXX_DiscardUnknown

func (m *GroupAndNode) XXX_DiscardUnknown()

func (*GroupAndNode) XXX_Marshal

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

func (*GroupAndNode) XXX_Merge

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

func (*GroupAndNode) XXX_Size

func (m *GroupAndNode) XXX_Size() int

func (*GroupAndNode) XXX_Unmarshal

func (m *GroupAndNode) XXX_Unmarshal(b []byte) error
type Link struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Url                  string   `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	Type                 string   `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Link) Descriptor

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

func (*Link) GetName

func (m *Link) GetName() string

func (*Link) GetType

func (m *Link) GetType() string

func (*Link) GetUrl

func (m *Link) GetUrl() string

func (*Link) ProtoMessage

func (*Link) ProtoMessage()

func (*Link) Reset

func (m *Link) Reset()

func (*Link) String

func (m *Link) String() string

func (*Link) XXX_DiscardUnknown

func (m *Link) XXX_DiscardUnknown()

func (*Link) XXX_Marshal

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

func (*Link) XXX_Merge

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

func (*Link) XXX_Size

func (m *Link) XXX_Size() int

func (*Link) XXX_Unmarshal

func (m *Link) XXX_Unmarshal(b []byte) error
type Links struct {
	Value                map[string]*Link `` /* 151-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*Links) Descriptor

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

func (*Links) GetValue

func (m *Links) GetValue() map[string]*Link

func (*Links) ProtoMessage

func (*Links) ProtoMessage()

func (*Links) Reset

func (m *Links) Reset()

func (*Links) String

func (m *Links) String() string

func (*Links) XXX_DiscardUnknown

func (m *Links) XXX_DiscardUnknown()

func (*Links) XXX_Marshal

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

func (*Links) XXX_Merge

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

func (*Links) XXX_Size

func (m *Links) XXX_Size() int

func (*Links) XXX_Unmarshal

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

type NodeClient

type NodeClient interface {
	GetNodes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Nodes, error)
	GetGroup(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AllGroupOrNode, error)
	GetNode(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*AllGroupOrNode, error)
	GetNowGroupAndName(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GroupAndNode, error)
	ChangeNowNode(ctx context.Context, in *GroupAndNode, opts ...grpc.CallOption) (*empty.Empty, error)
	AddNode(ctx context.Context, in *NodeMap, opts ...grpc.CallOption) (*empty.Empty, error)
	ModifyNode(ctx context.Context, in *NodeMap, opts ...grpc.CallOption) (*empty.Empty, error)
	DeleteNode(ctx context.Context, in *GroupAndNode, opts ...grpc.CallOption) (*empty.Empty, error)
	Latency(ctx context.Context, in *GroupAndNode, opts ...grpc.CallOption) (*wrappers.StringValue, error)
}

NodeClient is the client API for Node service.

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

func NewNodeClient

func NewNodeClient(cc grpc.ClientConnInterface) NodeClient

type NodeMap

type NodeMap struct {
	Value                map[string]string `` /* 151-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*NodeMap) Descriptor

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

func (*NodeMap) GetValue

func (m *NodeMap) GetValue() map[string]string

func (*NodeMap) ProtoMessage

func (*NodeMap) ProtoMessage()

func (*NodeMap) Reset

func (m *NodeMap) Reset()

func (*NodeMap) String

func (m *NodeMap) String() string

func (*NodeMap) XXX_DiscardUnknown

func (m *NodeMap) XXX_DiscardUnknown()

func (*NodeMap) XXX_Marshal

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

func (*NodeMap) XXX_Merge

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

func (*NodeMap) XXX_Size

func (m *NodeMap) XXX_Size() int

func (*NodeMap) XXX_Unmarshal

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

type NodeServer

NodeServer is the server API for Node service.

type Nodes

type Nodes struct {
	Value                map[string]*AllGroupOrNode `` /* 151-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

func (*Nodes) Descriptor

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

func (*Nodes) GetValue

func (m *Nodes) GetValue() map[string]*AllGroupOrNode

func (*Nodes) ProtoMessage

func (*Nodes) ProtoMessage()

func (*Nodes) Reset

func (m *Nodes) Reset()

func (*Nodes) String

func (m *Nodes) String() string

func (*Nodes) XXX_DiscardUnknown

func (m *Nodes) XXX_DiscardUnknown()

func (*Nodes) XXX_Marshal

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

func (*Nodes) XXX_Merge

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

func (*Nodes) XXX_Size

func (m *Nodes) XXX_Size() int

func (*Nodes) XXX_Unmarshal

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

type ProcessInitClient

type ProcessInitClient interface {
	CreateLockFile(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	ProcessInit(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	GetRunningHost(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*wrappers.StringValue, error)
	ClientOn(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	ProcessExit(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	GetKernelPid(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*wrappers.UInt32Value, error)
	StopKernel(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	SingleInstance(ctx context.Context, opts ...grpc.CallOption) (ProcessInit_SingleInstanceClient, error)
}

ProcessInitClient is the client API for ProcessInit service.

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

type ProcessInitServer

type ProcessInitServer interface {
	CreateLockFile(context.Context, *empty.Empty) (*empty.Empty, error)
	ProcessInit(context.Context, *empty.Empty) (*empty.Empty, error)
	GetRunningHost(context.Context, *empty.Empty) (*wrappers.StringValue, error)
	ClientOn(context.Context, *empty.Empty) (*empty.Empty, error)
	ProcessExit(context.Context, *empty.Empty) (*empty.Empty, error)
	GetKernelPid(context.Context, *empty.Empty) (*wrappers.UInt32Value, error)
	StopKernel(context.Context, *empty.Empty) (*empty.Empty, error)
	SingleInstance(ProcessInit_SingleInstanceServer) error
}

ProcessInitServer is the server API for ProcessInit service.

type ProcessInit_SingleInstanceClient

type ProcessInit_SingleInstanceClient interface {
	Send(*wrappers.StringValue) error
	Recv() (*wrappers.StringValue, error)
	grpc.ClientStream
}

type ProcessInit_SingleInstanceServer

type ProcessInit_SingleInstanceServer interface {
	Send(*wrappers.StringValue) error
	Recv() (*wrappers.StringValue, error)
	grpc.ServerStream
}

type SubscribeClient

type SubscribeClient interface {
	UpdateSub(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	GetSubLinks(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Links, error)
	AddSubLink(ctx context.Context, in *Link, opts ...grpc.CallOption) (*Links, error)
	DeleteSubLink(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*Links, error)
}

SubscribeClient is the client API for Subscribe service.

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

func NewSubscribeClient

func NewSubscribeClient(cc grpc.ClientConnInterface) SubscribeClient

type SubscribeServer

type SubscribeServer interface {
	UpdateSub(context.Context, *empty.Empty) (*empty.Empty, error)
	GetSubLinks(context.Context, *empty.Empty) (*Links, error)
	AddSubLink(context.Context, *Link) (*Links, error)
	DeleteSubLink(context.Context, *wrappers.StringValue) (*Links, error)
}

SubscribeServer is the server API for Subscribe service.

type UnimplementedConfigServer

type UnimplementedConfigServer struct {
}

UnimplementedConfigServer can be embedded to have forward compatible implementations.

func (*UnimplementedConfigServer) GetConfig

func (*UnimplementedConfigServer) GetRate

func (*UnimplementedConfigServer) ReimportRule

func (*UnimplementedConfigServer) ReimportRule(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*UnimplementedConfigServer) SetConfig

type UnimplementedNodeServer

type UnimplementedNodeServer struct {
}

UnimplementedNodeServer can be embedded to have forward compatible implementations.

func (*UnimplementedNodeServer) AddNode

func (*UnimplementedNodeServer) ChangeNowNode

func (*UnimplementedNodeServer) ChangeNowNode(ctx context.Context, req *GroupAndNode) (*empty.Empty, error)

func (*UnimplementedNodeServer) DeleteNode

func (*UnimplementedNodeServer) GetGroup

func (*UnimplementedNodeServer) GetNode

func (*UnimplementedNodeServer) GetNodes

func (*UnimplementedNodeServer) GetNodes(ctx context.Context, req *empty.Empty) (*Nodes, error)

func (*UnimplementedNodeServer) GetNowGroupAndName

func (*UnimplementedNodeServer) GetNowGroupAndName(ctx context.Context, req *empty.Empty) (*GroupAndNode, error)

func (*UnimplementedNodeServer) Latency

func (*UnimplementedNodeServer) ModifyNode

func (*UnimplementedNodeServer) ModifyNode(ctx context.Context, req *NodeMap) (*empty.Empty, error)

type UnimplementedProcessInitServer

type UnimplementedProcessInitServer struct {
}

UnimplementedProcessInitServer can be embedded to have forward compatible implementations.

func (*UnimplementedProcessInitServer) ClientOn

func (*UnimplementedProcessInitServer) CreateLockFile

func (*UnimplementedProcessInitServer) CreateLockFile(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*UnimplementedProcessInitServer) GetKernelPid

func (*UnimplementedProcessInitServer) GetRunningHost

func (*UnimplementedProcessInitServer) ProcessExit

func (*UnimplementedProcessInitServer) ProcessInit

func (*UnimplementedProcessInitServer) SingleInstance

func (*UnimplementedProcessInitServer) StopKernel

type UnimplementedSubscribeServer

type UnimplementedSubscribeServer struct {
}

UnimplementedSubscribeServer can be embedded to have forward compatible implementations.

func (*UnimplementedSubscribeServer) AddSubLink(ctx context.Context, req *Link) (*Links, error)
func (*UnimplementedSubscribeServer) GetSubLinks(ctx context.Context, req *empty.Empty) (*Links, error)

func (*UnimplementedSubscribeServer) UpdateSub

Jump to

Keyboard shortcuts

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