pb

package
v0.0.0-...-e70fc09 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:
	pb/service.proto
	pb/demo.proto

It has these top-level messages:
	DemoReqResp

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRaftReplicaServiceHandler

func RegisterRaftReplicaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterRaftReplicaServiceHandler registers the http handlers for service RaftReplicaService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterRaftReplicaServiceHandlerFromEndpoint

func RegisterRaftReplicaServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterRaftReplicaServiceHandlerFromEndpoint is same as RegisterRaftReplicaServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterRaftReplicaServiceServer

func RegisterRaftReplicaServiceServer(s *grpc.Server, srv RaftReplicaServiceServer)

Types

type DemoReqResp

type DemoReqResp struct {
	DemoMessages []*raftpb.Message `protobuf:"bytes,1,rep,name=demo_messages,json=demoMessages" json:"demo_messages,omitempty"`
	StateCode    int32             `protobuf:"varint,2,opt,name=state_code,json=stateCode,proto3" json:"state_code,omitempty"`
	StateMessage string            `protobuf:"bytes,3,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"`
}

func (*DemoReqResp) Descriptor

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

func (*DemoReqResp) GetDemoMessages

func (m *DemoReqResp) GetDemoMessages() []*raftpb.Message

func (*DemoReqResp) GetStateCode

func (m *DemoReqResp) GetStateCode() int32

func (*DemoReqResp) GetStateMessage

func (m *DemoReqResp) GetStateMessage() string

func (*DemoReqResp) ProtoMessage

func (*DemoReqResp) ProtoMessage()

func (*DemoReqResp) Reset

func (m *DemoReqResp) Reset()

func (*DemoReqResp) String

func (m *DemoReqResp) String() string

type RaftReplicaServiceClient

type RaftReplicaServiceClient interface {
	Demo(ctx context.Context, in *DemoReqResp, opts ...grpc.CallOption) (*DemoReqResp, error)
}

func NewRaftReplicaServiceClient

func NewRaftReplicaServiceClient(cc *grpc.ClientConn) RaftReplicaServiceClient

type RaftReplicaServiceServer

type RaftReplicaServiceServer interface {
	Demo(context.Context, *DemoReqResp) (*DemoReqResp, error)
}

Jump to

Keyboard shortcuts

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