pb

package
v0.0.0-...-bacbef4 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UnbindReason_name = map[int32]string{
		0: "Exit",
		1: "UnUsed",
		2: "Upgrade",
		3: "Downgrade",
		4: "Panic",
	}
	UnbindReason_value = map[string]int32{
		"Exit":      0,
		"UnUsed":    1,
		"Upgrade":   2,
		"Downgrade": 3,
		"Panic":     4,
	}
)

Enum value maps for UnbindReason.

View Source
var (
	CommunicateType_name = map[int32]string{
		0: "Bind",
		1: "Unbind",
		2: "ExecRequest",
		3: "ExecResponse",
		4: "Ping",
		5: "Log",
	}
	CommunicateType_value = map[string]int32{
		"Bind":         0,
		"Unbind":       1,
		"ExecRequest":  2,
		"ExecResponse": 3,
		"Ping":         4,
		"Log":          5,
	}
)

Enum value maps for CommunicateType.

View Source
var (
	CodecType_name = map[int32]string{
		0: "Map",
		1: "Bytes",
	}
	CodecType_value = map[string]int32{
		"Map":   0,
		"Bytes": 1,
	}
)

Enum value maps for CodecType.

View Source
var (
	LogLevel_name = map[int32]string{
		0: "Debug",
		1: "Info",
		2: "Warn",
		3: "Error",
	}
	LogLevel_value = map[string]int32{
		"Debug": 0,
		"Info":  1,
		"Warn":  2,
		"Error": 3,
	}
)

Enum value maps for LogLevel.

View Source
var (
	PluginStatus_name = map[int32]string{
		0: "Connected",
		1: "Disconnected",
	}
	PluginStatus_value = map[string]int32{
		"Connected":    0,
		"Disconnected": 1,
	}
)

Enum value maps for PluginStatus.

View Source
var (
	CoreStatus_name = map[int32]string{
		0: "Launched",
		1: "Stopped",
	}
	CoreStatus_value = map[string]int32{
		"Launched": 0,
		"Stopped":  1,
	}
)

Enum value maps for CoreStatus.

Functions

func RegisterConnServer

func RegisterConnServer(s *grpc.Server, srv ConnServer)

Types

type BindRequest

type BindRequest struct {
	Token     string   `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
	Name      string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`           // plugin name
	Version   string   `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version,omitempty"`     // plugin version
	Functions []string `protobuf:"bytes,4,rep,name=Functions,proto3" json:"Functions,omitempty"` // functions/handlers
	// contains filtered or unexported fields
}

func (*BindRequest) Descriptor deprecated

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

Deprecated: Use BindRequest.ProtoReflect.Descriptor instead.

func (*BindRequest) GetFunctions

func (x *BindRequest) GetFunctions() []string

func (*BindRequest) GetName

func (x *BindRequest) GetName() string

func (*BindRequest) GetToken

func (x *BindRequest) GetToken() string

func (*BindRequest) GetVersion

func (x *BindRequest) GetVersion() string

func (*BindRequest) ProtoMessage

func (*BindRequest) ProtoMessage()

func (*BindRequest) ProtoReflect

func (x *BindRequest) ProtoReflect() protoreflect.Message

func (*BindRequest) Reset

func (x *BindRequest) Reset()

func (*BindRequest) String

func (x *BindRequest) String() string

type CodecType

type CodecType int32
const (
	CodecType_Map   CodecType = 0
	CodecType_Bytes CodecType = 1
)

func (CodecType) Descriptor

func (CodecType) Descriptor() protoreflect.EnumDescriptor

func (CodecType) Enum

func (x CodecType) Enum() *CodecType

func (CodecType) EnumDescriptor deprecated

func (CodecType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CodecType.Descriptor instead.

func (CodecType) Number

func (x CodecType) Number() protoreflect.EnumNumber

func (CodecType) String

func (x CodecType) String() string

func (CodecType) Type

type CommunicateExecRequest

type CommunicateExecRequest struct {
	ID       uint64    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	FuncName string    `protobuf:"bytes,2,opt,name=FuncName,proto3" json:"FuncName,omitempty"`
	Type     CodecType `protobuf:"varint,3,opt,name=Type,proto3,enum=pb.CodecType" json:"Type,omitempty"` // codec type
	Payload  []byte    `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"`              // args
	// contains filtered or unexported fields
}

func (*CommunicateExecRequest) Descriptor deprecated

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

Deprecated: Use CommunicateExecRequest.ProtoReflect.Descriptor instead.

func (*CommunicateExecRequest) GetFuncName

func (x *CommunicateExecRequest) GetFuncName() string

func (*CommunicateExecRequest) GetID

func (x *CommunicateExecRequest) GetID() uint64

func (*CommunicateExecRequest) GetPayload

func (x *CommunicateExecRequest) GetPayload() []byte

func (*CommunicateExecRequest) GetType

func (x *CommunicateExecRequest) GetType() CodecType

func (*CommunicateExecRequest) ProtoMessage

func (*CommunicateExecRequest) ProtoMessage()

func (*CommunicateExecRequest) ProtoReflect

func (x *CommunicateExecRequest) ProtoReflect() protoreflect.Message

func (*CommunicateExecRequest) Reset

func (x *CommunicateExecRequest) Reset()

func (*CommunicateExecRequest) String

func (x *CommunicateExecRequest) String() string

type CommunicateExecResponse

type CommunicateExecResponse struct {
	ID     uint64    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Type   CodecType `protobuf:"varint,2,opt,name=Type,proto3,enum=pb.CodecType" json:"Type,omitempty"`
	Result []byte    `protobuf:"bytes,3,opt,name=Result,proto3" json:"Result,omitempty"`
	Err    *string   `protobuf:"bytes,4,opt,name=Err,proto3,oneof" json:"Err,omitempty"`
	// contains filtered or unexported fields
}

func (*CommunicateExecResponse) Descriptor deprecated

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

Deprecated: Use CommunicateExecResponse.ProtoReflect.Descriptor instead.

func (*CommunicateExecResponse) GetErr

func (x *CommunicateExecResponse) GetErr() string

func (*CommunicateExecResponse) GetID

func (x *CommunicateExecResponse) GetID() uint64

func (*CommunicateExecResponse) GetResult

func (x *CommunicateExecResponse) GetResult() []byte

func (*CommunicateExecResponse) GetType

func (x *CommunicateExecResponse) GetType() CodecType

func (*CommunicateExecResponse) ProtoMessage

func (*CommunicateExecResponse) ProtoMessage()

func (*CommunicateExecResponse) ProtoReflect

func (x *CommunicateExecResponse) ProtoReflect() protoreflect.Message

func (*CommunicateExecResponse) Reset

func (x *CommunicateExecResponse) Reset()

func (*CommunicateExecResponse) String

func (x *CommunicateExecResponse) String() string

type CommunicateMsg

type CommunicateMsg struct {
	Type CommunicateType `protobuf:"varint,1,opt,name=Type,proto3,enum=pb.CommunicateType" json:"Type,omitempty"`
	Data []byte          `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"`
	// contains filtered or unexported fields
}

func (*CommunicateMsg) Descriptor deprecated

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

Deprecated: Use CommunicateMsg.ProtoReflect.Descriptor instead.

func (*CommunicateMsg) GetData

func (x *CommunicateMsg) GetData() []byte

func (*CommunicateMsg) GetType

func (x *CommunicateMsg) GetType() CommunicateType

func (*CommunicateMsg) ProtoMessage

func (*CommunicateMsg) ProtoMessage()

func (*CommunicateMsg) ProtoReflect

func (x *CommunicateMsg) ProtoReflect() protoreflect.Message

func (*CommunicateMsg) Reset

func (x *CommunicateMsg) Reset()

func (*CommunicateMsg) String

func (x *CommunicateMsg) String() string

type CommunicateType

type CommunicateType int32
const (
	CommunicateType_Bind         CommunicateType = 0
	CommunicateType_Unbind       CommunicateType = 1
	CommunicateType_ExecRequest  CommunicateType = 2
	CommunicateType_ExecResponse CommunicateType = 3
	CommunicateType_Ping         CommunicateType = 4
	CommunicateType_Log          CommunicateType = 5
)

func (CommunicateType) Descriptor

func (CommunicateType) Enum

func (x CommunicateType) Enum() *CommunicateType

func (CommunicateType) EnumDescriptor deprecated

func (CommunicateType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CommunicateType.Descriptor instead.

func (CommunicateType) Number

func (CommunicateType) String

func (x CommunicateType) String() string

func (CommunicateType) Type

type ConnClient

type ConnClient interface {
	Log(ctx context.Context, opts ...grpc.CallOption) (Conn_LogClient, error)
	Communicate(ctx context.Context, opts ...grpc.CallOption) (Conn_CommunicateClient, error)
}

ConnClient is the client API for Conn service.

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

func NewConnClient

func NewConnClient(cc grpc.ClientConnInterface) ConnClient

type ConnServer

type ConnServer interface {
	Log(Conn_LogServer) error
	Communicate(Conn_CommunicateServer) error
}

ConnServer is the server API for Conn service.

type Conn_CommunicateClient

type Conn_CommunicateClient interface {
	Send(*CommunicateMsg) error
	Recv() (*CommunicateMsg, error)
	grpc.ClientStream
}

type Conn_CommunicateServer

type Conn_CommunicateServer interface {
	Send(*CommunicateMsg) error
	Recv() (*CommunicateMsg, error)
	grpc.ServerStream
}

type Conn_LogClient

type Conn_LogClient interface {
	Send(*LogInfo) error
	CloseAndRecv() (*Empty, error)
	grpc.ClientStream
}

type Conn_LogServer

type Conn_LogServer interface {
	SendAndClose(*Empty) error
	Recv() (*LogInfo, error)
	grpc.ServerStream
}

type CoreStatus

type CoreStatus int32
const (
	CoreStatus_Launched CoreStatus = 0
	CoreStatus_Stopped  CoreStatus = 1
)

func (CoreStatus) Descriptor

func (CoreStatus) Descriptor() protoreflect.EnumDescriptor

func (CoreStatus) Enum

func (x CoreStatus) Enum() *CoreStatus

func (CoreStatus) EnumDescriptor deprecated

func (CoreStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use CoreStatus.Descriptor instead.

func (CoreStatus) Number

func (x CoreStatus) Number() protoreflect.EnumNumber

func (CoreStatus) String

func (x CoreStatus) String() string

func (CoreStatus) Type

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type LogInfo

type LogInfo struct {
	Type    LogLevel `protobuf:"varint,1,opt,name=Type,proto3,enum=pb.LogLevel" json:"Type,omitempty"`
	Message string   `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	// contains filtered or unexported fields
}

func (*LogInfo) Descriptor deprecated

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

Deprecated: Use LogInfo.ProtoReflect.Descriptor instead.

func (*LogInfo) GetMessage

func (x *LogInfo) GetMessage() string

func (*LogInfo) GetType

func (x *LogInfo) GetType() LogLevel

func (*LogInfo) ProtoMessage

func (*LogInfo) ProtoMessage()

func (*LogInfo) ProtoReflect

func (x *LogInfo) ProtoReflect() protoreflect.Message

func (*LogInfo) Reset

func (x *LogInfo) Reset()

func (*LogInfo) String

func (x *LogInfo) String() string

type LogLevel

type LogLevel int32
const (
	LogLevel_Debug LogLevel = 0
	LogLevel_Info  LogLevel = 1
	LogLevel_Warn  LogLevel = 2
	LogLevel_Error LogLevel = 3
)

func (LogLevel) Descriptor

func (LogLevel) Descriptor() protoreflect.EnumDescriptor

func (LogLevel) Enum

func (x LogLevel) Enum() *LogLevel

func (LogLevel) EnumDescriptor deprecated

func (LogLevel) EnumDescriptor() ([]byte, []int)

Deprecated: Use LogLevel.Descriptor instead.

func (LogLevel) Number

func (x LogLevel) Number() protoreflect.EnumNumber

func (LogLevel) String

func (x LogLevel) String() string

func (LogLevel) Type

type PluginStatus

type PluginStatus int32
const (
	PluginStatus_Connected    PluginStatus = 0
	PluginStatus_Disconnected PluginStatus = 1
)

func (PluginStatus) Descriptor

func (PluginStatus) Enum

func (x PluginStatus) Enum() *PluginStatus

func (PluginStatus) EnumDescriptor deprecated

func (PluginStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use PluginStatus.Descriptor instead.

func (PluginStatus) Number

func (PluginStatus) String

func (x PluginStatus) String() string

func (PluginStatus) Type

type UnbindReason

type UnbindReason int32
const (
	UnbindReason_Exit      UnbindReason = 0
	UnbindReason_UnUsed    UnbindReason = 1
	UnbindReason_Upgrade   UnbindReason = 2
	UnbindReason_Downgrade UnbindReason = 3
	UnbindReason_Panic     UnbindReason = 4
)

func (UnbindReason) Descriptor

func (UnbindReason) Enum

func (x UnbindReason) Enum() *UnbindReason

func (UnbindReason) EnumDescriptor deprecated

func (UnbindReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use UnbindReason.Descriptor instead.

func (UnbindReason) Number

func (UnbindReason) String

func (x UnbindReason) String() string

func (UnbindReason) Type

type UnbindRequest

type UnbindRequest struct {
	Reason UnbindReason `protobuf:"varint,1,opt,name=Reason,proto3,enum=pb.UnbindReason" json:"Reason,omitempty"`
	Token  string       `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"`
	Msg    *string      `protobuf:"bytes,5,opt,name=Msg,proto3,oneof" json:"Msg,omitempty"`
	// contains filtered or unexported fields
}

func (*UnbindRequest) Descriptor deprecated

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

Deprecated: Use UnbindRequest.ProtoReflect.Descriptor instead.

func (*UnbindRequest) GetMsg

func (x *UnbindRequest) GetMsg() string

func (*UnbindRequest) GetReason

func (x *UnbindRequest) GetReason() UnbindReason

func (*UnbindRequest) GetToken

func (x *UnbindRequest) GetToken() string

func (*UnbindRequest) ProtoMessage

func (*UnbindRequest) ProtoMessage()

func (*UnbindRequest) ProtoReflect

func (x *UnbindRequest) ProtoReflect() protoreflect.Message

func (*UnbindRequest) Reset

func (x *UnbindRequest) Reset()

func (*UnbindRequest) String

func (x *UnbindRequest) String() string

type UnimplementedConnServer

type UnimplementedConnServer struct {
}

UnimplementedConnServer can be embedded to have forward compatible implementations.

func (*UnimplementedConnServer) Communicate

func (*UnimplementedConnServer) Log

Jump to

Keyboard shortcuts

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