proto

package
v0.0.0-...-f98774e Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_raft_proto protoreflect.FileDescriptor

Functions

func RegisterRaftServer

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

Types

type ApplyRequest

type ApplyRequest struct {
	Request []byte `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*ApplyRequest) Descriptor deprecated

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

Deprecated: Use ApplyRequest.ProtoReflect.Descriptor instead.

func (*ApplyRequest) GetRequest

func (x *ApplyRequest) GetRequest() []byte

func (*ApplyRequest) ProtoMessage

func (*ApplyRequest) ProtoMessage()

func (*ApplyRequest) ProtoReflect

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

func (*ApplyRequest) Reset

func (x *ApplyRequest) Reset()

func (*ApplyRequest) String

func (x *ApplyRequest) String() string

type ApplyResponse

type ApplyResponse struct {
	Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*ApplyResponse) Descriptor deprecated

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

Deprecated: Use ApplyResponse.ProtoReflect.Descriptor instead.

func (*ApplyResponse) GetResponse

func (x *ApplyResponse) GetResponse() []byte

func (*ApplyResponse) ProtoMessage

func (*ApplyResponse) ProtoMessage()

func (*ApplyResponse) ProtoReflect

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

func (*ApplyResponse) Reset

func (x *ApplyResponse) Reset()

func (*ApplyResponse) String

func (x *ApplyResponse) String() string

type GetDetailsRequest

type GetDetailsRequest struct {
	Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDetailsRequest) Descriptor deprecated

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

Deprecated: Use GetDetailsRequest.ProtoReflect.Descriptor instead.

func (*GetDetailsRequest) GetAddr

func (x *GetDetailsRequest) GetAddr() string

func (*GetDetailsRequest) ProtoMessage

func (*GetDetailsRequest) ProtoMessage()

func (*GetDetailsRequest) ProtoReflect

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

func (*GetDetailsRequest) Reset

func (x *GetDetailsRequest) Reset()

func (*GetDetailsRequest) String

func (x *GetDetailsRequest) String() string

type GetDetailsResponse

type GetDetailsResponse struct {
	ServerId       string   `protobuf:"bytes,1,opt,name=serverId,proto3" json:"serverId,omitempty"`
	RaftState      string   `protobuf:"bytes,2,opt,name=raftState,proto3" json:"raftState,omitempty"`
	Leader         string   `protobuf:"bytes,3,opt,name=leader,proto3" json:"leader,omitempty"`
	RaftPort       int32    `protobuf:"varint,4,opt,name=raftPort,proto3" json:"raftPort,omitempty"`
	DiscoveryPort  int32    `protobuf:"varint,5,opt,name=discoveryPort,proto3" json:"discoveryPort,omitempty"`
	HttpPort       int32    `protobuf:"varint,6,opt,name=httpPort,proto3" json:"httpPort,omitempty"`
	Error          string   `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"`
	DiscoveryNodes []string `protobuf:"bytes,8,rep,name=discoveryNodes,proto3" json:"discoveryNodes,omitempty"`
	StartTime      string   `protobuf:"bytes,9,opt,name=startTime,proto3" json:"startTime,omitempty"`
	Duration       string   `protobuf:"bytes,10,opt,name=duration,proto3" json:"duration,omitempty"`
	Rss            uint64   `protobuf:"varint,11,opt,name=rss,proto3" json:"rss,omitempty"`
	RaftLogSum     uint64   `protobuf:"varint,12,opt,name=raftLogSum,proto3" json:"raftLogSum,omitempty"`
	Pid            uint64   `protobuf:"varint,13,opt,name=pid,proto3" json:"pid,omitempty"`
	Pcpu           float32  `protobuf:"fixed32,14,opt,name=pcpu,proto3" json:"pcpu,omitempty"`
	BizData        string   `protobuf:"bytes,15,opt,name=bizData,proto3" json:"bizData,omitempty"`
	Addr           []string `protobuf:"bytes,16,rep,name=addr,proto3" json:"addr,omitempty"`
	LeaderID       string   `protobuf:"bytes,17,opt,name=leaderID,proto3" json:"leaderID,omitempty"`
	NodeIds        []string `protobuf:"bytes,18,rep,name=nodeIds,proto3" json:"nodeIds,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDetailsResponse) Descriptor deprecated

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

Deprecated: Use GetDetailsResponse.ProtoReflect.Descriptor instead.

func (*GetDetailsResponse) GetAddr

func (x *GetDetailsResponse) GetAddr() []string

func (*GetDetailsResponse) GetBizData

func (x *GetDetailsResponse) GetBizData() string

func (*GetDetailsResponse) GetDiscoveryNodes

func (x *GetDetailsResponse) GetDiscoveryNodes() []string

func (*GetDetailsResponse) GetDiscoveryPort

func (x *GetDetailsResponse) GetDiscoveryPort() int32

func (*GetDetailsResponse) GetDuration

func (x *GetDetailsResponse) GetDuration() string

func (*GetDetailsResponse) GetError

func (x *GetDetailsResponse) GetError() string

func (*GetDetailsResponse) GetHttpPort

func (x *GetDetailsResponse) GetHttpPort() int32

func (*GetDetailsResponse) GetLeader

func (x *GetDetailsResponse) GetLeader() string

func (*GetDetailsResponse) GetLeaderID

func (x *GetDetailsResponse) GetLeaderID() string

func (*GetDetailsResponse) GetNodeIds

func (x *GetDetailsResponse) GetNodeIds() []string

func (*GetDetailsResponse) GetPcpu

func (x *GetDetailsResponse) GetPcpu() float32

func (*GetDetailsResponse) GetPid

func (x *GetDetailsResponse) GetPid() uint64

func (*GetDetailsResponse) GetRaftLogSum

func (x *GetDetailsResponse) GetRaftLogSum() uint64

func (*GetDetailsResponse) GetRaftPort

func (x *GetDetailsResponse) GetRaftPort() int32

func (*GetDetailsResponse) GetRaftState

func (x *GetDetailsResponse) GetRaftState() string

func (*GetDetailsResponse) GetRss

func (x *GetDetailsResponse) GetRss() uint64

func (*GetDetailsResponse) GetServerId

func (x *GetDetailsResponse) GetServerId() string

func (*GetDetailsResponse) GetStartTime

func (x *GetDetailsResponse) GetStartTime() string

func (*GetDetailsResponse) ProtoMessage

func (*GetDetailsResponse) ProtoMessage()

func (*GetDetailsResponse) ProtoReflect

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

func (*GetDetailsResponse) Reset

func (x *GetDetailsResponse) Reset()

func (*GetDetailsResponse) String

func (x *GetDetailsResponse) String() string

type RaftClient

type RaftClient interface {
	ApplyLog(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error)
	GetDetails(ctx context.Context, in *GetDetailsRequest, opts ...grpc.CallOption) (*GetDetailsResponse, 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.ClientConnInterface) RaftClient

type RaftServer

type RaftServer interface {
	ApplyLog(context.Context, *ApplyRequest) (*ApplyResponse, error)
	GetDetails(context.Context, *GetDetailsRequest) (*GetDetailsResponse, error)
}

RaftServer is the server API for Raft service.

type UnimplementedRaftServer

type UnimplementedRaftServer struct {
}

UnimplementedRaftServer can be embedded to have forward compatible implementations.

func (*UnimplementedRaftServer) ApplyLog

func (*UnimplementedRaftServer) GetDetails

Jump to

Keyboard shortcuts

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