proto

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CommandName_name = map[int32]string{
		0: "HealthCheck",
	}
	CommandName_value = map[string]int32{
		"HealthCheck": 0,
	}
)

Enum value maps for CommandName.

View Source
var (
	ConnectionAck_State_name = map[int32]string{
		0: "Negotiating",
		1: "Known",
	}
	ConnectionAck_State_value = map[string]int32{
		"Negotiating": 0,
		"Known":       1,
	}
)

Enum value maps for ConnectionAck_State.

View Source
var (
	NodeConfig_State_name = map[int32]string{
		0: "Unknown",
		1: "Alive",
		2: "Unresponsive",
	}
	NodeConfig_State_value = map[string]int32{
		"Unknown":      0,
		"Alive":        1,
		"Unresponsive": 2,
	}
)

Enum value maps for NodeConfig_State.

View Source
var File_command_proto protoreflect.FileDescriptor
View Source
var File_connection_proto protoreflect.FileDescriptor

Functions

func RegisterCommandServer

func RegisterCommandServer(s *grpc.Server, srv CommandServer)

func RegisterNodeServer

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

Types

type CommandAck

type CommandAck struct {
	CommandName CommandName `protobuf:"varint,1,opt,name=commandName,proto3,enum=proto.CommandName" json:"commandName,omitempty"`
	Response    string      `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
	Error       string      `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandAck) Descriptor deprecated

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

Deprecated: Use CommandAck.ProtoReflect.Descriptor instead.

func (*CommandAck) GetCommandName

func (x *CommandAck) GetCommandName() CommandName

func (*CommandAck) GetError

func (x *CommandAck) GetError() string

func (*CommandAck) GetResponse

func (x *CommandAck) GetResponse() string

func (*CommandAck) ProtoMessage

func (*CommandAck) ProtoMessage()

func (*CommandAck) ProtoReflect

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

func (*CommandAck) Reset

func (x *CommandAck) Reset()

func (*CommandAck) String

func (x *CommandAck) String() string

type CommandClient

type CommandClient interface {
	// Leader to client stream
	Send(ctx context.Context, in *CommandSyn, opts ...grpc.CallOption) (*CommandAck, error)
}

CommandClient is the client API for Command service.

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

func NewCommandClient

func NewCommandClient(cc grpc.ClientConnInterface) CommandClient

type CommandName

type CommandName int32
const (
	CommandName_HealthCheck CommandName = 0
)

func (CommandName) Descriptor

func (CommandName) Enum

func (x CommandName) Enum() *CommandName

func (CommandName) EnumDescriptor deprecated

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

Deprecated: Use CommandName.Descriptor instead.

func (CommandName) Number

func (x CommandName) Number() protoreflect.EnumNumber

func (CommandName) String

func (x CommandName) String() string

func (CommandName) Type

type CommandServer

type CommandServer interface {
	// Leader to client stream
	Send(context.Context, *CommandSyn) (*CommandAck, error)
}

CommandServer is the server API for Command service.

type CommandSyn

type CommandSyn struct {
	CommandName CommandName `protobuf:"varint,1,opt,name=commandName,proto3,enum=proto.CommandName" json:"commandName,omitempty"`
	CommandArgs string      `protobuf:"bytes,2,opt,name=commandArgs,proto3" json:"commandArgs,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandSyn) Descriptor deprecated

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

Deprecated: Use CommandSyn.ProtoReflect.Descriptor instead.

func (*CommandSyn) GetCommandArgs

func (x *CommandSyn) GetCommandArgs() string

func (*CommandSyn) GetCommandName

func (x *CommandSyn) GetCommandName() CommandName

func (*CommandSyn) ProtoMessage

func (*CommandSyn) ProtoMessage()

func (*CommandSyn) ProtoReflect

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

func (*CommandSyn) Reset

func (x *CommandSyn) Reset()

func (*CommandSyn) String

func (x *CommandSyn) String() string

type ConnectionAck

type ConnectionAck struct {
	Node  *NodeConfig         `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	State ConnectionAck_State `protobuf:"varint,2,opt,name=state,proto3,enum=proto.ConnectionAck_State" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectionAck) Descriptor deprecated

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

Deprecated: Use ConnectionAck.ProtoReflect.Descriptor instead.

func (*ConnectionAck) GetNode

func (x *ConnectionAck) GetNode() *NodeConfig

func (*ConnectionAck) GetState

func (x *ConnectionAck) GetState() ConnectionAck_State

func (*ConnectionAck) ProtoMessage

func (*ConnectionAck) ProtoMessage()

func (*ConnectionAck) ProtoReflect

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

func (*ConnectionAck) Reset

func (x *ConnectionAck) Reset()

func (*ConnectionAck) String

func (x *ConnectionAck) String() string

type ConnectionAck_State

type ConnectionAck_State int32
const (
	ConnectionAck_Negotiating ConnectionAck_State = 0
	ConnectionAck_Known       ConnectionAck_State = 1
)

func (ConnectionAck_State) Descriptor

func (ConnectionAck_State) Enum

func (ConnectionAck_State) EnumDescriptor deprecated

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

Deprecated: Use ConnectionAck_State.Descriptor instead.

func (ConnectionAck_State) Number

func (ConnectionAck_State) String

func (x ConnectionAck_State) String() string

func (ConnectionAck_State) Type

type ConnectionSyn

type ConnectionSyn struct {
	Node *NodeConfig `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectionSyn) Descriptor deprecated

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

Deprecated: Use ConnectionSyn.ProtoReflect.Descriptor instead.

func (*ConnectionSyn) GetNode

func (x *ConnectionSyn) GetNode() *NodeConfig

func (*ConnectionSyn) ProtoMessage

func (*ConnectionSyn) ProtoMessage()

func (*ConnectionSyn) ProtoReflect

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

func (*ConnectionSyn) Reset

func (x *ConnectionSyn) Reset()

func (*ConnectionSyn) String

func (x *ConnectionSyn) String() string

type NodeClient

type NodeClient interface {
	// Client to leader registration
	Register(ctx context.Context, in *ConnectionSyn, opts ...grpc.CallOption) (*ConnectionAck, 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 NodeConfig

type NodeConfig struct {
	Guid    string           `protobuf:"bytes,1,opt,name=guid,proto3" json:"guid,omitempty"`
	IpAddr  string           `protobuf:"bytes,3,opt,name=IpAddr,proto3" json:"IpAddr,omitempty"`
	Network string           `protobuf:"bytes,4,opt,name=Network,proto3" json:"Network,omitempty"`
	State   NodeConfig_State `protobuf:"varint,5,opt,name=state,proto3,enum=proto.NodeConfig_State" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*NodeConfig) Descriptor deprecated

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

Deprecated: Use NodeConfig.ProtoReflect.Descriptor instead.

func (*NodeConfig) GetGuid

func (x *NodeConfig) GetGuid() string

func (*NodeConfig) GetIpAddr

func (x *NodeConfig) GetIpAddr() string

func (*NodeConfig) GetNetwork

func (x *NodeConfig) GetNetwork() string

func (*NodeConfig) GetState

func (x *NodeConfig) GetState() NodeConfig_State

func (*NodeConfig) ProtoMessage

func (*NodeConfig) ProtoMessage()

func (*NodeConfig) ProtoReflect

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

func (*NodeConfig) Reset

func (x *NodeConfig) Reset()

func (*NodeConfig) String

func (x *NodeConfig) String() string

type NodeConfig_State

type NodeConfig_State int32
const (
	NodeConfig_Unknown      NodeConfig_State = 0
	NodeConfig_Alive        NodeConfig_State = 1
	NodeConfig_Unresponsive NodeConfig_State = 2
)

func (NodeConfig_State) Descriptor

func (NodeConfig_State) Enum

func (NodeConfig_State) EnumDescriptor deprecated

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

Deprecated: Use NodeConfig_State.Descriptor instead.

func (NodeConfig_State) Number

func (NodeConfig_State) String

func (x NodeConfig_State) String() string

func (NodeConfig_State) Type

type NodeServer

type NodeServer interface {
	// Client to leader registration
	Register(context.Context, *ConnectionSyn) (*ConnectionAck, error)
}

NodeServer is the server API for Node service.

type UnimplementedCommandServer

type UnimplementedCommandServer struct {
}

UnimplementedCommandServer can be embedded to have forward compatible implementations.

func (*UnimplementedCommandServer) Send

type UnimplementedNodeServer

type UnimplementedNodeServer struct {
}

UnimplementedNodeServer can be embedded to have forward compatible implementations.

func (*UnimplementedNodeServer) Register

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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