Documentation ¶
Index ¶
- Variables
- func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer)
- func RegisterLogServer(s grpc.ServiceRegistrar, srv LogServer)
- type ConsumeRequest
- type ConsumeResponse
- type ErrOffsetOutOfRange
- type GetServersRequest
- type GetServersResponse
- func (*GetServersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetServersResponse) GetServers() []*Server
- func (*GetServersResponse) ProtoMessage()
- func (x *GetServersResponse) ProtoReflect() protoreflect.Message
- func (x *GetServersResponse) Reset()
- func (x *GetServersResponse) String() string
- type HealthCheckRequest
- func (*HealthCheckRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HealthCheckRequest) GetService() string
- func (*HealthCheckRequest) ProtoMessage()
- func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message
- func (x *HealthCheckRequest) Reset()
- func (x *HealthCheckRequest) String() string
- type HealthCheckResponse
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HealthCheckResponse) GetStauts() HealthCheckResponse_ServingStatus
- func (*HealthCheckResponse) ProtoMessage()
- func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
- func (x *HealthCheckResponse) Reset()
- func (x *HealthCheckResponse) String() string
- type HealthCheckResponse_ServingStatus
- func (HealthCheckResponse_ServingStatus) Descriptor() protoreflect.EnumDescriptor
- func (x HealthCheckResponse_ServingStatus) Enum() *HealthCheckResponse_ServingStatus
- func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x HealthCheckResponse_ServingStatus) Number() protoreflect.EnumNumber
- func (x HealthCheckResponse_ServingStatus) String() string
- func (HealthCheckResponse_ServingStatus) Type() protoreflect.EnumType
- type HealthClient
- type HealthServer
- type Health_WatchClient
- type Health_WatchServer
- type LogClient
- type LogServer
- type Log_ConsumeStreamClient
- type Log_ConsumeStreamServer
- type Log_ProduceStreamClient
- type Log_ProduceStreamServer
- type ProduceRequest
- type ProduceResponse
- type Record
- func (*Record) Descriptor() ([]byte, []int)deprecated
- func (x *Record) GetOffset() uint64
- func (x *Record) GetTerm() uint64
- func (x *Record) GetType() uint32
- func (x *Record) GetValue() []byte
- func (*Record) ProtoMessage()
- func (x *Record) ProtoReflect() protoreflect.Message
- func (x *Record) Reset()
- func (x *Record) String() string
- type Server
- type UnimplementedHealthServer
- type UnimplementedLogServer
- func (UnimplementedLogServer) Consume(context.Context, *ConsumeRequest) (*ConsumeResponse, error)
- func (UnimplementedLogServer) ConsumeStream(*ConsumeRequest, Log_ConsumeStreamServer) error
- func (UnimplementedLogServer) GetServers(context.Context, *GetServersRequest) (*GetServersResponse, error)
- func (UnimplementedLogServer) Produce(context.Context, *ProduceRequest) (*ProduceResponse, error)
- func (UnimplementedLogServer) ProduceStream(Log_ProduceStreamServer) error
- type UnsafeHealthServer
- type UnsafeLogServer
Constants ¶
This section is empty.
Variables ¶
var ( HealthCheckResponse_ServingStatus_name = map[int32]string{ 0: "UNKNOWN", 1: "SERVING", 2: "NOT_SERVING", } HealthCheckResponse_ServingStatus_value = map[string]int32{ "UNKNOWN": 0, "SERVING": 1, "NOT_SERVING": 2, } )
Enum value maps for HealthCheckResponse_ServingStatus.
var File_api_v1_health_check_proto protoreflect.FileDescriptor
var File_api_v1_log_proto protoreflect.FileDescriptor
var Health_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.health.v1.Health", HandlerType: (*HealthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Check", Handler: _Health_Check_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Watch", Handler: _Health_Watch_Handler, ServerStreams: true, }, }, Metadata: "api/v1/health_check.proto", }
Health_ServiceDesc is the grpc.ServiceDesc for Health service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Log_ServiceDesc = grpc.ServiceDesc{ ServiceName: "log.v1.Log", HandlerType: (*LogServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Produce", Handler: _Log_Produce_Handler, }, { MethodName: "Consume", Handler: _Log_Consume_Handler, }, { MethodName: "GetServers", Handler: _Log_GetServers_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ConsumeStream", Handler: _Log_ConsumeStream_Handler, ServerStreams: true, }, { StreamName: "ProduceStream", Handler: _Log_ProduceStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "api/v1/log.proto", }
Log_ServiceDesc is the grpc.ServiceDesc for Log service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHealthServer ¶
func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer)
func RegisterLogServer ¶
func RegisterLogServer(s grpc.ServiceRegistrar, srv LogServer)
Types ¶
type ConsumeRequest ¶
type ConsumeRequest struct { Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
func (*ConsumeRequest) Descriptor
deprecated
func (*ConsumeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConsumeRequest.ProtoReflect.Descriptor instead.
func (*ConsumeRequest) GetOffset ¶
func (x *ConsumeRequest) GetOffset() uint64
func (*ConsumeRequest) ProtoMessage ¶
func (*ConsumeRequest) ProtoMessage()
func (*ConsumeRequest) ProtoReflect ¶
func (x *ConsumeRequest) ProtoReflect() protoreflect.Message
func (*ConsumeRequest) Reset ¶
func (x *ConsumeRequest) Reset()
func (*ConsumeRequest) String ¶
func (x *ConsumeRequest) String() string
type ConsumeResponse ¶
type ConsumeResponse struct { Record *Record `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` // contains filtered or unexported fields }
func (*ConsumeResponse) Descriptor
deprecated
func (*ConsumeResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConsumeResponse.ProtoReflect.Descriptor instead.
func (*ConsumeResponse) GetRecord ¶
func (x *ConsumeResponse) GetRecord() *Record
func (*ConsumeResponse) ProtoMessage ¶
func (*ConsumeResponse) ProtoMessage()
func (*ConsumeResponse) ProtoReflect ¶
func (x *ConsumeResponse) ProtoReflect() protoreflect.Message
func (*ConsumeResponse) Reset ¶
func (x *ConsumeResponse) Reset()
func (*ConsumeResponse) String ¶
func (x *ConsumeResponse) String() string
type ErrOffsetOutOfRange ¶
type ErrOffsetOutOfRange struct {
Offset uint64
}
func (ErrOffsetOutOfRange) Error ¶
func (e ErrOffsetOutOfRange) Error() string
func (ErrOffsetOutOfRange) GRPCStatus ¶
func (e ErrOffsetOutOfRange) GRPCStatus() *status.Status
type GetServersRequest ¶
type GetServersRequest struct {
// contains filtered or unexported fields
}
func (*GetServersRequest) Descriptor
deprecated
func (*GetServersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetServersRequest.ProtoReflect.Descriptor instead.
func (*GetServersRequest) ProtoMessage ¶
func (*GetServersRequest) ProtoMessage()
func (*GetServersRequest) ProtoReflect ¶
func (x *GetServersRequest) ProtoReflect() protoreflect.Message
func (*GetServersRequest) Reset ¶
func (x *GetServersRequest) Reset()
func (*GetServersRequest) String ¶
func (x *GetServersRequest) String() string
type GetServersResponse ¶
type GetServersResponse struct { Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"` // contains filtered or unexported fields }
func (*GetServersResponse) Descriptor
deprecated
func (*GetServersResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetServersResponse.ProtoReflect.Descriptor instead.
func (*GetServersResponse) GetServers ¶
func (x *GetServersResponse) GetServers() []*Server
func (*GetServersResponse) ProtoMessage ¶
func (*GetServersResponse) ProtoMessage()
func (*GetServersResponse) ProtoReflect ¶
func (x *GetServersResponse) ProtoReflect() protoreflect.Message
func (*GetServersResponse) Reset ¶
func (x *GetServersResponse) Reset()
func (*GetServersResponse) String ¶
func (x *GetServersResponse) String() string
type HealthCheckRequest ¶
type HealthCheckRequest struct { Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` // contains filtered or unexported fields }
func (*HealthCheckRequest) Descriptor
deprecated
func (*HealthCheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
func (*HealthCheckRequest) GetService ¶
func (x *HealthCheckRequest) GetService() string
func (*HealthCheckRequest) ProtoMessage ¶
func (*HealthCheckRequest) ProtoMessage()
func (*HealthCheckRequest) ProtoReflect ¶
func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message
func (*HealthCheckRequest) Reset ¶
func (x *HealthCheckRequest) Reset()
func (*HealthCheckRequest) String ¶
func (x *HealthCheckRequest) String() string
type HealthCheckResponse ¶
type HealthCheckResponse struct { Stauts HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=stauts,proto3,enum=grpc.health.v1.HealthCheckResponse_ServingStatus" json:"stauts,omitempty"` // contains filtered or unexported fields }
func (*HealthCheckResponse) Descriptor
deprecated
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
func (*HealthCheckResponse) GetStauts ¶
func (x *HealthCheckResponse) GetStauts() HealthCheckResponse_ServingStatus
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) ProtoReflect ¶
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
func (*HealthCheckResponse) Reset ¶
func (x *HealthCheckResponse) Reset()
func (*HealthCheckResponse) String ¶
func (x *HealthCheckResponse) String() string
type HealthCheckResponse_ServingStatus ¶
type HealthCheckResponse_ServingStatus int32
const ( HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0 HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1 HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2 )
func (HealthCheckResponse_ServingStatus) Descriptor ¶
func (HealthCheckResponse_ServingStatus) Descriptor() protoreflect.EnumDescriptor
func (HealthCheckResponse_ServingStatus) Enum ¶
func (x HealthCheckResponse_ServingStatus) Enum() *HealthCheckResponse_ServingStatus
func (HealthCheckResponse_ServingStatus) EnumDescriptor
deprecated
func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use HealthCheckResponse_ServingStatus.Descriptor instead.
func (HealthCheckResponse_ServingStatus) Number ¶
func (x HealthCheckResponse_ServingStatus) Number() protoreflect.EnumNumber
func (HealthCheckResponse_ServingStatus) String ¶
func (x HealthCheckResponse_ServingStatus) String() string
func (HealthCheckResponse_ServingStatus) Type ¶
func (HealthCheckResponse_ServingStatus) Type() protoreflect.EnumType
type HealthClient ¶
type HealthClient interface { Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (Health_WatchClient, error) }
HealthClient is the client API for Health service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewHealthClient ¶
func NewHealthClient(cc grpc.ClientConnInterface) HealthClient
type HealthServer ¶
type HealthServer interface { Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) Watch(*HealthCheckRequest, Health_WatchServer) error // contains filtered or unexported methods }
HealthServer is the server API for Health service. All implementations must embed UnimplementedHealthServer for forward compatibility
type Health_WatchClient ¶
type Health_WatchClient interface { Recv() (*HealthCheckResponse, error) grpc.ClientStream }
type Health_WatchServer ¶
type Health_WatchServer interface { Send(*HealthCheckResponse) error grpc.ServerStream }
type LogClient ¶
type LogClient interface { Produce(ctx context.Context, in *ProduceRequest, opts ...grpc.CallOption) (*ProduceResponse, error) Consume(ctx context.Context, in *ConsumeRequest, opts ...grpc.CallOption) (*ConsumeResponse, error) ConsumeStream(ctx context.Context, in *ConsumeRequest, opts ...grpc.CallOption) (Log_ConsumeStreamClient, error) ProduceStream(ctx context.Context, opts ...grpc.CallOption) (Log_ProduceStreamClient, error) GetServers(ctx context.Context, in *GetServersRequest, opts ...grpc.CallOption) (*GetServersResponse, error) }
LogClient is the client API for Log service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewLogClient ¶
func NewLogClient(cc grpc.ClientConnInterface) LogClient
type LogServer ¶
type LogServer interface { Produce(context.Context, *ProduceRequest) (*ProduceResponse, error) Consume(context.Context, *ConsumeRequest) (*ConsumeResponse, error) ConsumeStream(*ConsumeRequest, Log_ConsumeStreamServer) error ProduceStream(Log_ProduceStreamServer) error GetServers(context.Context, *GetServersRequest) (*GetServersResponse, error) // contains filtered or unexported methods }
LogServer is the server API for Log service. All implementations must embed UnimplementedLogServer for forward compatibility
type Log_ConsumeStreamClient ¶
type Log_ConsumeStreamClient interface { Recv() (*ConsumeResponse, error) grpc.ClientStream }
type Log_ConsumeStreamServer ¶
type Log_ConsumeStreamServer interface { Send(*ConsumeResponse) error grpc.ServerStream }
type Log_ProduceStreamClient ¶
type Log_ProduceStreamClient interface { Send(*ProduceRequest) error Recv() (*ProduceResponse, error) grpc.ClientStream }
type Log_ProduceStreamServer ¶
type Log_ProduceStreamServer interface { Send(*ProduceResponse) error Recv() (*ProduceRequest, error) grpc.ServerStream }
type ProduceRequest ¶
type ProduceRequest struct { Record *Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` // contains filtered or unexported fields }
func (*ProduceRequest) Descriptor
deprecated
func (*ProduceRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProduceRequest.ProtoReflect.Descriptor instead.
func (*ProduceRequest) GetRecord ¶
func (x *ProduceRequest) GetRecord() *Record
func (*ProduceRequest) ProtoMessage ¶
func (*ProduceRequest) ProtoMessage()
func (*ProduceRequest) ProtoReflect ¶
func (x *ProduceRequest) ProtoReflect() protoreflect.Message
func (*ProduceRequest) Reset ¶
func (x *ProduceRequest) Reset()
func (*ProduceRequest) String ¶
func (x *ProduceRequest) String() string
type ProduceResponse ¶
type ProduceResponse struct { Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
func (*ProduceResponse) Descriptor
deprecated
func (*ProduceResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProduceResponse.ProtoReflect.Descriptor instead.
func (*ProduceResponse) GetOffset ¶
func (x *ProduceResponse) GetOffset() uint64
func (*ProduceResponse) ProtoMessage ¶
func (*ProduceResponse) ProtoMessage()
func (*ProduceResponse) ProtoReflect ¶
func (x *ProduceResponse) ProtoReflect() protoreflect.Message
func (*ProduceResponse) Reset ¶
func (x *ProduceResponse) Reset()
func (*ProduceResponse) String ¶
func (x *ProduceResponse) String() string
type Record ¶
type Record struct { Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` Term uint64 `protobuf:"varint,3,opt,name=term,proto3" json:"term,omitempty"` Type uint32 `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Record) Descriptor
deprecated
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
type Server ¶
type Server struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` RpcAddr string `protobuf:"bytes,2,opt,name=rpc_addr,json=rpcAddr,proto3" json:"rpc_addr,omitempty"` IsLeader bool `protobuf:"varint,3,opt,name=is_leader,json=isLeader,proto3" json:"is_leader,omitempty"` // contains filtered or unexported fields }
func (*Server) Descriptor
deprecated
func (*Server) GetIsLeader ¶
func (*Server) GetRpcAddr ¶
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
func (*Server) ProtoReflect ¶
func (x *Server) ProtoReflect() protoreflect.Message
type UnimplementedHealthServer ¶
type UnimplementedHealthServer struct { }
UnimplementedHealthServer must be embedded to have forward compatible implementations.
func (UnimplementedHealthServer) Check ¶
func (UnimplementedHealthServer) Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
func (UnimplementedHealthServer) Watch ¶
func (UnimplementedHealthServer) Watch(*HealthCheckRequest, Health_WatchServer) error
type UnimplementedLogServer ¶
type UnimplementedLogServer struct { }
UnimplementedLogServer must be embedded to have forward compatible implementations.
func (UnimplementedLogServer) Consume ¶
func (UnimplementedLogServer) Consume(context.Context, *ConsumeRequest) (*ConsumeResponse, error)
func (UnimplementedLogServer) ConsumeStream ¶
func (UnimplementedLogServer) ConsumeStream(*ConsumeRequest, Log_ConsumeStreamServer) error
func (UnimplementedLogServer) GetServers ¶
func (UnimplementedLogServer) GetServers(context.Context, *GetServersRequest) (*GetServersResponse, error)
func (UnimplementedLogServer) Produce ¶
func (UnimplementedLogServer) Produce(context.Context, *ProduceRequest) (*ProduceResponse, error)
func (UnimplementedLogServer) ProduceStream ¶
func (UnimplementedLogServer) ProduceStream(Log_ProduceStreamServer) error
type UnsafeHealthServer ¶
type UnsafeHealthServer interface {
// contains filtered or unexported methods
}
UnsafeHealthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HealthServer will result in compilation errors.
type UnsafeLogServer ¶
type UnsafeLogServer interface {
// contains filtered or unexported methods
}
UnsafeLogServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LogServer will result in compilation errors.