clusterpb

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: MPL-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterNodeServer

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

func RegisterRaftServer

func RegisterRaftServer(s *grpc.Server, srv RaftServer)

Types

type GetMembersRequest

type GetMembersRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetMembersRequest) Descriptor

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

func (*GetMembersRequest) ProtoMessage

func (*GetMembersRequest) ProtoMessage()

func (*GetMembersRequest) Reset

func (m *GetMembersRequest) Reset()

func (*GetMembersRequest) String

func (m *GetMembersRequest) String() string

func (*GetMembersRequest) XXX_DiscardUnknown

func (m *GetMembersRequest) XXX_DiscardUnknown()

func (*GetMembersRequest) XXX_Marshal

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

func (*GetMembersRequest) XXX_Merge

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

func (*GetMembersRequest) XXX_Size

func (m *GetMembersRequest) XXX_Size() int

func (*GetMembersRequest) XXX_Unmarshal

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

type GetMembersResponse

type GetMembersResponse struct {
	Members              []*Member `protobuf:"bytes,1,rep,name=Members,proto3" json:"Members,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*GetMembersResponse) Descriptor

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

func (*GetMembersResponse) GetMembers

func (m *GetMembersResponse) GetMembers() []*Member

func (*GetMembersResponse) ProtoMessage

func (*GetMembersResponse) ProtoMessage()

func (*GetMembersResponse) Reset

func (m *GetMembersResponse) Reset()

func (*GetMembersResponse) String

func (m *GetMembersResponse) String() string

func (*GetMembersResponse) XXX_DiscardUnknown

func (m *GetMembersResponse) XXX_DiscardUnknown()

func (*GetMembersResponse) XXX_Marshal

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

func (*GetMembersResponse) XXX_Merge

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

func (*GetMembersResponse) XXX_Size

func (m *GetMembersResponse) XXX_Size() int

func (*GetMembersResponse) XXX_Unmarshal

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

type GetStatusRequest

type GetStatusRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetStatusRequest) Descriptor

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

func (*GetStatusRequest) ProtoMessage

func (*GetStatusRequest) ProtoMessage()

func (*GetStatusRequest) Reset

func (m *GetStatusRequest) Reset()

func (*GetStatusRequest) String

func (m *GetStatusRequest) String() string

func (*GetStatusRequest) XXX_DiscardUnknown

func (m *GetStatusRequest) XXX_DiscardUnknown()

func (*GetStatusRequest) XXX_Marshal

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

func (*GetStatusRequest) XXX_Merge

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

func (*GetStatusRequest) XXX_Size

func (m *GetStatusRequest) XXX_Size() int

func (*GetStatusRequest) XXX_Unmarshal

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

type GetStatusResponse

type GetStatusResponse struct {
	IsLeader             bool     `protobuf:"varint,1,opt,name=IsLeader,proto3" json:"IsLeader,omitempty"`
	HasBeenBootstrapped  bool     `protobuf:"varint,2,opt,name=HasBeenBootstrapped,proto3" json:"HasBeenBootstrapped,omitempty"`
	IsInCluster          bool     `protobuf:"varint,3,opt,name=IsInCluster,proto3" json:"IsInCluster,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetStatusResponse) Descriptor

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

func (*GetStatusResponse) GetHasBeenBootstrapped

func (m *GetStatusResponse) GetHasBeenBootstrapped() bool

func (*GetStatusResponse) GetIsInCluster

func (m *GetStatusResponse) GetIsInCluster() bool

func (*GetStatusResponse) GetIsLeader

func (m *GetStatusResponse) GetIsLeader() bool

func (*GetStatusResponse) ProtoMessage

func (*GetStatusResponse) ProtoMessage()

func (*GetStatusResponse) Reset

func (m *GetStatusResponse) Reset()

func (*GetStatusResponse) String

func (m *GetStatusResponse) String() string

func (*GetStatusResponse) XXX_DiscardUnknown

func (m *GetStatusResponse) XXX_DiscardUnknown()

func (*GetStatusResponse) XXX_Marshal

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

func (*GetStatusResponse) XXX_Merge

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

func (*GetStatusResponse) XXX_Size

func (m *GetStatusResponse) XXX_Size() int

func (*GetStatusResponse) XXX_Unmarshal

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

type JoinClusterResponse

type JoinClusterResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*JoinClusterResponse) Descriptor

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

func (*JoinClusterResponse) ProtoMessage

func (*JoinClusterResponse) ProtoMessage()

func (*JoinClusterResponse) Reset

func (m *JoinClusterResponse) Reset()

func (*JoinClusterResponse) String

func (m *JoinClusterResponse) String() string

func (*JoinClusterResponse) XXX_DiscardUnknown

func (m *JoinClusterResponse) XXX_DiscardUnknown()

func (*JoinClusterResponse) XXX_Marshal

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

func (*JoinClusterResponse) XXX_Merge

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

func (*JoinClusterResponse) XXX_Size

func (m *JoinClusterResponse) XXX_Size() int

func (*JoinClusterResponse) XXX_Unmarshal

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

type Member

type Member struct {
	ID                   uint64   `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Address              string   `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"`
	IsLeader             bool     `protobuf:"varint,3,opt,name=IsLeader,proto3" json:"IsLeader,omitempty"`
	IsAlive              bool     `protobuf:"varint,4,opt,name=IsAlive,proto3" json:"IsAlive,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Member) Descriptor

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

func (*Member) GetAddress

func (m *Member) GetAddress() string

func (*Member) GetID

func (m *Member) GetID() uint64

func (*Member) GetIsAlive

func (m *Member) GetIsAlive() bool

func (*Member) GetIsLeader

func (m *Member) GetIsLeader() bool

func (*Member) ProtoMessage

func (*Member) ProtoMessage()

func (*Member) Reset

func (m *Member) Reset()

func (*Member) String

func (m *Member) String() string

func (*Member) XXX_DiscardUnknown

func (m *Member) XXX_DiscardUnknown()

func (*Member) XXX_Marshal

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

func (*Member) XXX_Merge

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

func (*Member) XXX_Size

func (m *Member) XXX_Size() int

func (*Member) XXX_Unmarshal

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

type NodeClient

type NodeClient interface {
}

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.ClientConn) NodeClient

type NodeServer

type NodeServer interface {
}

NodeServer is the server API for Node service.

type Payload

type Payload struct {
	Data                 []byte   `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Payload) Descriptor

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

func (*Payload) GetData

func (m *Payload) GetData() []byte

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) Reset

func (m *Payload) Reset()

func (*Payload) String

func (m *Payload) String() string

func (*Payload) XXX_DiscardUnknown

func (m *Payload) XXX_DiscardUnknown()

func (*Payload) XXX_Marshal

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

func (*Payload) XXX_Merge

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

func (*Payload) XXX_Size

func (m *Payload) XXX_Size() int

func (*Payload) XXX_Unmarshal

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

type PeerResponse

type PeerResponse struct {
	Status               bool     `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeerResponse) Descriptor

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

func (*PeerResponse) GetStatus

func (m *PeerResponse) GetStatus() bool

func (*PeerResponse) ProtoMessage

func (*PeerResponse) ProtoMessage()

func (*PeerResponse) Reset

func (m *PeerResponse) Reset()

func (*PeerResponse) String

func (m *PeerResponse) String() string

func (*PeerResponse) XXX_DiscardUnknown

func (m *PeerResponse) XXX_DiscardUnknown()

func (*PeerResponse) XXX_Marshal

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

func (*PeerResponse) XXX_Merge

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

func (*PeerResponse) XXX_Size

func (m *PeerResponse) XXX_Size() int

func (*PeerResponse) XXX_Unmarshal

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

type RaftClient

type RaftClient interface {
	ProcessMessage(ctx context.Context, in *raftpb.Message, opts ...grpc.CallOption) (*Payload, error)
	JoinCluster(ctx context.Context, in *RaftContext, opts ...grpc.CallOption) (*JoinClusterResponse, error)
	GetMembers(ctx context.Context, in *GetMembersRequest, opts ...grpc.CallOption) (*GetMembersResponse, error)
	GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error)
}

RaftClient is the client API for Raft service.

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

func NewRaftClient

func NewRaftClient(cc *grpc.ClientConn) RaftClient

type RaftContext

type RaftContext struct {
	ID                   uint64   `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Address              string   `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RaftContext) Descriptor

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

func (*RaftContext) GetAddress

func (m *RaftContext) GetAddress() string

func (*RaftContext) GetID

func (m *RaftContext) GetID() uint64

func (*RaftContext) ProtoMessage

func (*RaftContext) ProtoMessage()

func (*RaftContext) Reset

func (m *RaftContext) Reset()

func (*RaftContext) String

func (m *RaftContext) String() string

func (*RaftContext) XXX_DiscardUnknown

func (m *RaftContext) XXX_DiscardUnknown()

func (*RaftContext) XXX_Marshal

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

func (*RaftContext) XXX_Merge

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

func (*RaftContext) XXX_Size

func (m *RaftContext) XXX_Size() int

func (*RaftContext) XXX_Unmarshal

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

type RaftServer

RaftServer is the server API for Raft service.

type UnimplementedNodeServer

type UnimplementedNodeServer struct {
}

UnimplementedNodeServer can be embedded to have forward compatible implementations.

type UnimplementedRaftServer

type UnimplementedRaftServer struct {
}

UnimplementedRaftServer can be embedded to have forward compatible implementations.

func (*UnimplementedRaftServer) GetMembers

func (*UnimplementedRaftServer) GetStatus

func (*UnimplementedRaftServer) JoinCluster

func (*UnimplementedRaftServer) ProcessMessage

func (*UnimplementedRaftServer) ProcessMessage(ctx context.Context, req *raftpb.Message) (*Payload, error)

Jump to

Keyboard shortcuts

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