Documentation ¶
Overview ¶
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterBroadcastServiceServer(s grpc.ServiceRegistrar, srv BroadcastServiceServer)
- func RegisterDqliteConnectionServer(s grpc.ServiceRegistrar, srv DqliteConnectionServer)
- func RegisterInitializeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterInitializeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InitializeServiceClient) error
- func RegisterInitializeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterInitializeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InitializeServiceServer) error
- func RegisterInitializeServiceServer(s grpc.ServiceRegistrar, srv InitializeServiceServer)
- type Broadcast
- func (*Broadcast) Descriptor() ([]byte, []int)deprecated
- func (x *Broadcast) GetPayload() []byte
- func (x *Broadcast) GetType() BroadcastType
- func (msg *Broadcast) MarshalJSON() ([]byte, error)
- func (*Broadcast) ProtoMessage()
- func (x *Broadcast) ProtoReflect() protoreflect.Message
- func (x *Broadcast) Reset()
- func (x *Broadcast) String() string
- func (msg *Broadcast) UnmarshalJSON(b []byte) error
- type BroadcastServiceClient
- type BroadcastServiceServer
- type BroadcastType
- func (BroadcastType) Descriptor() protoreflect.EnumDescriptor
- func (x BroadcastType) Enum() *BroadcastType
- func (BroadcastType) EnumDescriptor() ([]byte, []int)deprecated
- func (x BroadcastType) Number() protoreflect.EnumNumber
- func (x BroadcastType) String() string
- func (BroadcastType) Type() protoreflect.EnumType
- type DqliteConnectionClient
- type DqliteConnectionServer
- type DqliteConnection_ServeDqliteClient
- type DqliteConnection_ServeDqliteServer
- type DqliteData
- func (*DqliteData) Descriptor() ([]byte, []int)deprecated
- func (x *DqliteData) GetData() []byte
- func (msg *DqliteData) MarshalJSON() ([]byte, error)
- func (*DqliteData) ProtoMessage()
- func (x *DqliteData) ProtoReflect() protoreflect.Message
- func (x *DqliteData) Reset()
- func (x *DqliteData) String() string
- func (msg *DqliteData) UnmarshalJSON(b []byte) error
- type EstimateLatencyRequest
- func (*EstimateLatencyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EstimateLatencyRequest) GetIp() string
- func (x *EstimateLatencyRequest) GetPort() int32
- func (msg *EstimateLatencyRequest) MarshalJSON() ([]byte, error)
- func (*EstimateLatencyRequest) ProtoMessage()
- func (x *EstimateLatencyRequest) ProtoReflect() protoreflect.Message
- func (x *EstimateLatencyRequest) Reset()
- func (x *EstimateLatencyRequest) String() string
- func (msg *EstimateLatencyRequest) UnmarshalJSON(b []byte) error
- type EstimateLatencyResponse
- func (*EstimateLatencyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EstimateLatencyResponse) GetLatency() int32
- func (msg *EstimateLatencyResponse) MarshalJSON() ([]byte, error)
- func (*EstimateLatencyResponse) ProtoMessage()
- func (x *EstimateLatencyResponse) ProtoReflect() protoreflect.Message
- func (x *EstimateLatencyResponse) Reset()
- func (x *EstimateLatencyResponse) String() string
- func (msg *EstimateLatencyResponse) UnmarshalJSON(b []byte) error
- type GetClusterInfoResponse
- func (*GetClusterInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetClusterInfoResponse) GetNodes() []*Node
- func (msg *GetClusterInfoResponse) MarshalJSON() ([]byte, error)
- func (*GetClusterInfoResponse) ProtoMessage()
- func (x *GetClusterInfoResponse) ProtoReflect() protoreflect.Message
- func (x *GetClusterInfoResponse) Reset()
- func (x *GetClusterInfoResponse) String() string
- func (msg *GetClusterInfoResponse) UnmarshalJSON(b []byte) error
- type InitializeServiceClient
- type InitializeServiceServer
- type KV
- func (*KV) Descriptor() ([]byte, []int)deprecated
- func (x *KV) GetCreatedAt() *timestamppb.Timestamp
- func (x *KV) GetExpiresAt() *timestamppb.Timestamp
- func (x *KV) GetId() int64
- func (x *KV) GetKey() string
- func (x *KV) GetUpdatedAt() *timestamppb.Timestamp
- func (x *KV) GetValue() string
- func (msg *KV) MarshalJSON() ([]byte, error)
- func (*KV) ProtoMessage()
- func (x *KV) ProtoReflect() protoreflect.Message
- func (x *KV) Reset()
- func (x *KV) String() string
- func (msg *KV) UnmarshalJSON(b []byte) error
- type LinkState
- func (*LinkState) Descriptor() ([]byte, []int)deprecated
- func (x *LinkState) GetFrom() string
- func (x *LinkState) GetLatency() int32
- func (x *LinkState) GetTo() string
- func (msg *LinkState) MarshalJSON() ([]byte, error)
- func (*LinkState) ProtoMessage()
- func (x *LinkState) ProtoReflect() protoreflect.Message
- func (x *LinkState) Reset()
- func (x *LinkState) String() string
- func (msg *LinkState) UnmarshalJSON(b []byte) error
- type MultiBroadcastRequest
- func (*MultiBroadcastRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MultiBroadcastRequest) GetBroadcasts() []*Broadcast
- func (msg *MultiBroadcastRequest) MarshalJSON() ([]byte, error)
- func (*MultiBroadcastRequest) ProtoMessage()
- func (x *MultiBroadcastRequest) ProtoReflect() protoreflect.Message
- func (x *MultiBroadcastRequest) Reset()
- func (x *MultiBroadcastRequest) String() string
- func (msg *MultiBroadcastRequest) UnmarshalJSON(b []byte) error
- type Node
- func (*Node) Descriptor() ([]byte, []int)deprecated
- func (x *Node) GetComment() *wrapperspb.StringValue
- func (x *Node) GetCreatedAt() *timestamppb.Timestamp
- func (x *Node) GetId() string
- func (x *Node) GetIp() string
- func (x *Node) GetName() *wrapperspb.StringValue
- func (x *Node) GetPort() int64
- func (x *Node) GetUpdatedAt() *timestamppb.Timestamp
- func (msg *Node) MarshalJSON() ([]byte, error)
- func (*Node) ProtoMessage()
- func (x *Node) ProtoReflect() protoreflect.Message
- func (x *Node) Reset()
- func (x *Node) String() string
- func (msg *Node) UnmarshalJSON(b []byte) error
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetCsr() []byte
- func (x *RegisterRequest) GetIp() string
- func (x *RegisterRequest) GetLinkStates() []*LinkState
- func (x *RegisterRequest) GetPort() int32
- func (x *RegisterRequest) GetServerID() string
- func (msg *RegisterRequest) MarshalJSON() ([]byte, error)
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- func (msg *RegisterRequest) UnmarshalJSON(b []byte) error
- type RegisterResponse
- func (*RegisterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterResponse) GetClientCert() []byte
- func (x *RegisterResponse) GetClusterCACert() []byte
- func (x *RegisterResponse) GetLinkStates() []*LinkState
- func (msg *RegisterResponse) MarshalJSON() ([]byte, error)
- func (*RegisterResponse) ProtoMessage()
- func (x *RegisterResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterResponse) Reset()
- func (x *RegisterResponse) String() string
- func (msg *RegisterResponse) UnmarshalJSON(b []byte) error
- type UnimplementedBroadcastServiceServer
- type UnimplementedDqliteConnectionServer
- type UnimplementedInitializeServiceServer
- func (UnimplementedInitializeServiceServer) EstimateLatency(context.Context, *EstimateLatencyRequest) (*EstimateLatencyResponse, error)
- func (UnimplementedInitializeServiceServer) GetClusterInfo(context.Context, *emptypb.Empty) (*GetClusterInfoResponse, error)
- func (UnimplementedInitializeServiceServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
- func (UnimplementedInitializeServiceServer) UpdateLinkState(context.Context, *UpdateLinkStateRequest) (*UpdateLinkStateResponse, error)
- type UnsafeBroadcastServiceServer
- type UnsafeDqliteConnectionServer
- type UnsafeInitializeServiceServer
- type UpdateLinkStateRequest
- func (*UpdateLinkStateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateLinkStateRequest) GetIp() string
- func (x *UpdateLinkStateRequest) GetLinkStates() []*LinkState
- func (x *UpdateLinkStateRequest) GetPort() int32
- func (x *UpdateLinkStateRequest) GetServerID() string
- func (msg *UpdateLinkStateRequest) MarshalJSON() ([]byte, error)
- func (*UpdateLinkStateRequest) ProtoMessage()
- func (x *UpdateLinkStateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateLinkStateRequest) Reset()
- func (x *UpdateLinkStateRequest) String() string
- func (msg *UpdateLinkStateRequest) UnmarshalJSON(b []byte) error
- type UpdateLinkStateResponse
- func (*UpdateLinkStateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateLinkStateResponse) GetLinkStates() []*LinkState
- func (msg *UpdateLinkStateResponse) MarshalJSON() ([]byte, error)
- func (*UpdateLinkStateResponse) ProtoMessage()
- func (x *UpdateLinkStateResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateLinkStateResponse) Reset()
- func (x *UpdateLinkStateResponse) String() string
- func (msg *UpdateLinkStateResponse) UnmarshalJSON(b []byte) error
Constants ¶
const ( InitializeService_EstimateLatency_FullMethodName = "/openPanel.InitializeService/EstimateLatency" InitializeService_UpdateLinkState_FullMethodName = "/openPanel.InitializeService/UpdateLinkState" InitializeService_Register_FullMethodName = "/openPanel.InitializeService/Register" InitializeService_GetClusterInfo_FullMethodName = "/openPanel.InitializeService/GetClusterInfo" )
const (
BroadcastService_Broadcast_FullMethodName = "/openPanel.BroadcastService/Broadcast"
)
const (
DqliteConnection_ServeDqlite_FullMethodName = "/dqlite.DqliteConnection/ServeDqlite"
)
Variables ¶
var ( BroadcastType_name = map[int32]string{ 0: "LINK_STATE_CHANGE", } BroadcastType_value = map[string]int32{ "LINK_STATE_CHANGE": 0, } )
Enum value maps for BroadcastType.
var BroadcastService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "openPanel.BroadcastService", HandlerType: (*BroadcastServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Broadcast", Handler: _BroadcastService_Broadcast_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "broadcast.proto", }
BroadcastService_ServiceDesc is the grpc.ServiceDesc for BroadcastService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var DqliteConnection_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dqlite.DqliteConnection", HandlerType: (*DqliteConnectionServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "ServeDqlite", Handler: _DqliteConnection_ServeDqlite_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "dqlite.proto", }
DqliteConnection_ServiceDesc is the grpc.ServiceDesc for DqliteConnection service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_broadcast_proto protoreflect.FileDescriptor
var File_common_proto protoreflect.FileDescriptor
var File_dqlite_proto protoreflect.FileDescriptor
var File_entpb_proto protoreflect.FileDescriptor
var File_http_proto protoreflect.FileDescriptor
var File_initialize_proto protoreflect.FileDescriptor
var File_openapi_proto protoreflect.FileDescriptor
var File_router_proto protoreflect.FileDescriptor
var InitializeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "openPanel.InitializeService", HandlerType: (*InitializeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "EstimateLatency", Handler: _InitializeService_EstimateLatency_Handler, }, { MethodName: "UpdateLinkState", Handler: _InitializeService_UpdateLinkState_Handler, }, { MethodName: "Register", Handler: _InitializeService_Register_Handler, }, { MethodName: "GetClusterInfo", Handler: _InitializeService_GetClusterInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "initialize.proto", }
InitializeService_ServiceDesc is the grpc.ServiceDesc for InitializeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterBroadcastServiceServer ¶
func RegisterBroadcastServiceServer(s grpc.ServiceRegistrar, srv BroadcastServiceServer)
func RegisterDqliteConnectionServer ¶
func RegisterDqliteConnectionServer(s grpc.ServiceRegistrar, srv DqliteConnectionServer)
func RegisterInitializeServiceHandler ¶
func RegisterInitializeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterInitializeServiceHandler registers the http handlers for service InitializeService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterInitializeServiceHandlerClient ¶
func RegisterInitializeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InitializeServiceClient) error
RegisterInitializeServiceHandlerClient registers the http handlers for service InitializeService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InitializeServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InitializeServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InitializeServiceClient" to call the correct interceptors.
func RegisterInitializeServiceHandlerFromEndpoint ¶
func RegisterInitializeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterInitializeServiceHandlerFromEndpoint is same as RegisterInitializeServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterInitializeServiceHandlerServer ¶
func RegisterInitializeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InitializeServiceServer) error
RegisterInitializeServiceHandlerServer registers the http handlers for service InitializeService to "mux". UnaryRPC :call InitializeServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInitializeServiceHandlerFromEndpoint instead.
func RegisterInitializeServiceServer ¶
func RegisterInitializeServiceServer(s grpc.ServiceRegistrar, srv InitializeServiceServer)
Types ¶
type Broadcast ¶
type Broadcast struct { Type BroadcastType `protobuf:"varint,1,opt,name=type,proto3,enum=openPanel.BroadcastType" json:"type,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*Broadcast) Descriptor
deprecated
func (*Broadcast) GetPayload ¶
func (*Broadcast) GetType ¶
func (x *Broadcast) GetType() BroadcastType
func (*Broadcast) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*Broadcast) ProtoMessage ¶
func (*Broadcast) ProtoMessage()
func (*Broadcast) ProtoReflect ¶
func (x *Broadcast) ProtoReflect() protoreflect.Message
func (*Broadcast) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type BroadcastServiceClient ¶
type BroadcastServiceClient interface {
Broadcast(ctx context.Context, in *MultiBroadcastRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
BroadcastServiceClient is the client API for BroadcastService 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 NewBroadcastServiceClient ¶
func NewBroadcastServiceClient(cc grpc.ClientConnInterface) BroadcastServiceClient
type BroadcastServiceServer ¶
type BroadcastServiceServer interface {
Broadcast(context.Context, *MultiBroadcastRequest) (*emptypb.Empty, error)
}
BroadcastServiceServer is the server API for BroadcastService service. All implementations should embed UnimplementedBroadcastServiceServer for forward compatibility
type BroadcastType ¶
type BroadcastType int32
const ( // used for periodic latency re-establishment and node add/remove/modify BroadcastType_LINK_STATE_CHANGE BroadcastType = 0 )
func (BroadcastType) Descriptor ¶
func (BroadcastType) Descriptor() protoreflect.EnumDescriptor
func (BroadcastType) Enum ¶
func (x BroadcastType) Enum() *BroadcastType
func (BroadcastType) EnumDescriptor
deprecated
func (BroadcastType) EnumDescriptor() ([]byte, []int)
Deprecated: Use BroadcastType.Descriptor instead.
func (BroadcastType) Number ¶
func (x BroadcastType) Number() protoreflect.EnumNumber
func (BroadcastType) String ¶
func (x BroadcastType) String() string
func (BroadcastType) Type ¶
func (BroadcastType) Type() protoreflect.EnumType
type DqliteConnectionClient ¶
type DqliteConnectionClient interface {
ServeDqlite(ctx context.Context, opts ...grpc.CallOption) (DqliteConnection_ServeDqliteClient, error)
}
DqliteConnectionClient is the client API for DqliteConnection 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 NewDqliteConnectionClient ¶
func NewDqliteConnectionClient(cc grpc.ClientConnInterface) DqliteConnectionClient
type DqliteConnectionServer ¶
type DqliteConnectionServer interface {
ServeDqlite(DqliteConnection_ServeDqliteServer) error
}
DqliteConnectionServer is the server API for DqliteConnection service. All implementations should embed UnimplementedDqliteConnectionServer for forward compatibility
type DqliteConnection_ServeDqliteClient ¶
type DqliteConnection_ServeDqliteClient interface { Send(*DqliteData) error Recv() (*DqliteData, error) grpc.ClientStream }
type DqliteConnection_ServeDqliteServer ¶
type DqliteConnection_ServeDqliteServer interface { Send(*DqliteData) error Recv() (*DqliteData, error) grpc.ServerStream }
type DqliteData ¶
type DqliteData struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*DqliteData) Descriptor
deprecated
func (*DqliteData) Descriptor() ([]byte, []int)
Deprecated: Use DqliteData.ProtoReflect.Descriptor instead.
func (*DqliteData) GetData ¶
func (x *DqliteData) GetData() []byte
func (*DqliteData) MarshalJSON ¶
func (msg *DqliteData) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*DqliteData) ProtoMessage ¶
func (*DqliteData) ProtoMessage()
func (*DqliteData) ProtoReflect ¶
func (x *DqliteData) ProtoReflect() protoreflect.Message
func (*DqliteData) Reset ¶
func (x *DqliteData) Reset()
func (*DqliteData) String ¶
func (x *DqliteData) String() string
func (*DqliteData) UnmarshalJSON ¶
func (msg *DqliteData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type EstimateLatencyRequest ¶
type EstimateLatencyRequest struct { Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // contains filtered or unexported fields }
func (*EstimateLatencyRequest) Descriptor
deprecated
func (*EstimateLatencyRequest) Descriptor() ([]byte, []int)
Deprecated: Use EstimateLatencyRequest.ProtoReflect.Descriptor instead.
func (*EstimateLatencyRequest) GetIp ¶
func (x *EstimateLatencyRequest) GetIp() string
func (*EstimateLatencyRequest) GetPort ¶
func (x *EstimateLatencyRequest) GetPort() int32
func (*EstimateLatencyRequest) MarshalJSON ¶
func (msg *EstimateLatencyRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*EstimateLatencyRequest) ProtoMessage ¶
func (*EstimateLatencyRequest) ProtoMessage()
func (*EstimateLatencyRequest) ProtoReflect ¶
func (x *EstimateLatencyRequest) ProtoReflect() protoreflect.Message
func (*EstimateLatencyRequest) Reset ¶
func (x *EstimateLatencyRequest) Reset()
func (*EstimateLatencyRequest) String ¶
func (x *EstimateLatencyRequest) String() string
func (*EstimateLatencyRequest) UnmarshalJSON ¶
func (msg *EstimateLatencyRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type EstimateLatencyResponse ¶
type EstimateLatencyResponse struct { Latency int32 `protobuf:"varint,1,opt,name=latency,proto3" json:"latency,omitempty"` // contains filtered or unexported fields }
func (*EstimateLatencyResponse) Descriptor
deprecated
func (*EstimateLatencyResponse) Descriptor() ([]byte, []int)
Deprecated: Use EstimateLatencyResponse.ProtoReflect.Descriptor instead.
func (*EstimateLatencyResponse) GetLatency ¶
func (x *EstimateLatencyResponse) GetLatency() int32
func (*EstimateLatencyResponse) MarshalJSON ¶
func (msg *EstimateLatencyResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*EstimateLatencyResponse) ProtoMessage ¶
func (*EstimateLatencyResponse) ProtoMessage()
func (*EstimateLatencyResponse) ProtoReflect ¶
func (x *EstimateLatencyResponse) ProtoReflect() protoreflect.Message
func (*EstimateLatencyResponse) Reset ¶
func (x *EstimateLatencyResponse) Reset()
func (*EstimateLatencyResponse) String ¶
func (x *EstimateLatencyResponse) String() string
func (*EstimateLatencyResponse) UnmarshalJSON ¶
func (msg *EstimateLatencyResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type GetClusterInfoResponse ¶
type GetClusterInfoResponse struct { Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` // contains filtered or unexported fields }
func (*GetClusterInfoResponse) Descriptor
deprecated
func (*GetClusterInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetClusterInfoResponse.ProtoReflect.Descriptor instead.
func (*GetClusterInfoResponse) GetNodes ¶
func (x *GetClusterInfoResponse) GetNodes() []*Node
func (*GetClusterInfoResponse) MarshalJSON ¶
func (msg *GetClusterInfoResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*GetClusterInfoResponse) ProtoMessage ¶
func (*GetClusterInfoResponse) ProtoMessage()
func (*GetClusterInfoResponse) ProtoReflect ¶
func (x *GetClusterInfoResponse) ProtoReflect() protoreflect.Message
func (*GetClusterInfoResponse) Reset ¶
func (x *GetClusterInfoResponse) Reset()
func (*GetClusterInfoResponse) String ¶
func (x *GetClusterInfoResponse) String() string
func (*GetClusterInfoResponse) UnmarshalJSON ¶
func (msg *GetClusterInfoResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type InitializeServiceClient ¶
type InitializeServiceClient interface { // request target node to estimate the latency between the target node and the payload node EstimateLatency(ctx context.Context, in *EstimateLatencyRequest, opts ...grpc.CallOption) (*EstimateLatencyResponse, error) // request target node to update its link states, and return the updated link states UpdateLinkState(ctx context.Context, in *UpdateLinkStateRequest, opts ...grpc.CallOption) (*UpdateLinkStateResponse, error) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) GetClusterInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetClusterInfoResponse, error) }
InitializeServiceClient is the client API for InitializeService 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 NewInitializeServiceClient ¶
func NewInitializeServiceClient(cc grpc.ClientConnInterface) InitializeServiceClient
type InitializeServiceServer ¶
type InitializeServiceServer interface { // request target node to estimate the latency between the target node and the payload node EstimateLatency(context.Context, *EstimateLatencyRequest) (*EstimateLatencyResponse, error) // request target node to update its link states, and return the updated link states UpdateLinkState(context.Context, *UpdateLinkStateRequest) (*UpdateLinkStateResponse, error) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) GetClusterInfo(context.Context, *emptypb.Empty) (*GetClusterInfoResponse, error) }
InitializeServiceServer is the server API for InitializeService service. All implementations should embed UnimplementedInitializeServiceServer for forward compatibility
type KV ¶
type KV struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,536870900,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,536870901,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` // contains filtered or unexported fields }
func (*KV) Descriptor
deprecated
func (*KV) GetCreatedAt ¶
func (x *KV) GetCreatedAt() *timestamppb.Timestamp
func (*KV) GetExpiresAt ¶
func (x *KV) GetExpiresAt() *timestamppb.Timestamp
func (*KV) GetUpdatedAt ¶
func (x *KV) GetUpdatedAt() *timestamppb.Timestamp
func (*KV) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*KV) ProtoMessage ¶
func (*KV) ProtoMessage()
func (*KV) ProtoReflect ¶
func (x *KV) ProtoReflect() protoreflect.Message
func (*KV) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type LinkState ¶
type LinkState struct { From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` Latency int32 `protobuf:"varint,3,opt,name=latency,proto3" json:"latency,omitempty"` // contains filtered or unexported fields }
func (*LinkState) Descriptor
deprecated
func (*LinkState) GetLatency ¶
func (*LinkState) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*LinkState) ProtoMessage ¶
func (*LinkState) ProtoMessage()
func (*LinkState) ProtoReflect ¶
func (x *LinkState) ProtoReflect() protoreflect.Message
func (*LinkState) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type MultiBroadcastRequest ¶
type MultiBroadcastRequest struct { Broadcasts []*Broadcast `protobuf:"bytes,1,rep,name=broadcasts,proto3" json:"broadcasts,omitempty"` // contains filtered or unexported fields }
func (*MultiBroadcastRequest) Descriptor
deprecated
func (*MultiBroadcastRequest) Descriptor() ([]byte, []int)
Deprecated: Use MultiBroadcastRequest.ProtoReflect.Descriptor instead.
func (*MultiBroadcastRequest) GetBroadcasts ¶
func (x *MultiBroadcastRequest) GetBroadcasts() []*Broadcast
func (*MultiBroadcastRequest) MarshalJSON ¶
func (msg *MultiBroadcastRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*MultiBroadcastRequest) ProtoMessage ¶
func (*MultiBroadcastRequest) ProtoMessage()
func (*MultiBroadcastRequest) ProtoReflect ¶
func (x *MultiBroadcastRequest) ProtoReflect() protoreflect.Message
func (*MultiBroadcastRequest) Reset ¶
func (x *MultiBroadcastRequest) Reset()
func (*MultiBroadcastRequest) String ¶
func (x *MultiBroadcastRequest) String() string
func (*MultiBroadcastRequest) UnmarshalJSON ¶
func (msg *MultiBroadcastRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type Node ¶
type Node struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,536870900,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,536870901,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` Name *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"` Port int64 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` Comment *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=comment,proto3" json:"comment,omitempty"` // contains filtered or unexported fields }
func (*Node) Descriptor
deprecated
func (*Node) GetComment ¶
func (x *Node) GetComment() *wrapperspb.StringValue
func (*Node) GetCreatedAt ¶
func (x *Node) GetCreatedAt() *timestamppb.Timestamp
func (*Node) GetName ¶
func (x *Node) GetName() *wrapperspb.StringValue
func (*Node) GetUpdatedAt ¶
func (x *Node) GetUpdatedAt() *timestamppb.Timestamp
func (*Node) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶
func (x *Node) ProtoReflect() protoreflect.Message
func (*Node) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type RegisterRequest ¶
type RegisterRequest struct { Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` ServerID string `protobuf:"bytes,3,opt,name=serverID,proto3" json:"serverID,omitempty"` Csr []byte `protobuf:"bytes,4,opt,name=csr,proto3" json:"csr,omitempty"` LinkStates []*LinkState `protobuf:"bytes,5,rep,name=linkStates,proto3" json:"linkStates,omitempty"` // link states from new node to all known nodes // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetCsr ¶
func (x *RegisterRequest) GetCsr() []byte
func (*RegisterRequest) GetIp ¶
func (x *RegisterRequest) GetIp() string
func (*RegisterRequest) GetLinkStates ¶
func (x *RegisterRequest) GetLinkStates() []*LinkState
func (*RegisterRequest) GetPort ¶
func (x *RegisterRequest) GetPort() int32
func (*RegisterRequest) GetServerID ¶
func (x *RegisterRequest) GetServerID() string
func (*RegisterRequest) MarshalJSON ¶
func (msg *RegisterRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
func (*RegisterRequest) UnmarshalJSON ¶
func (msg *RegisterRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type RegisterResponse ¶
type RegisterResponse struct { ClientCert []byte `protobuf:"bytes,1,opt,name=clientCert,proto3" json:"clientCert,omitempty"` ClusterCACert []byte `protobuf:"bytes,2,opt,name=clusterCACert,proto3" json:"clusterCACert,omitempty"` LinkStates []*LinkState `protobuf:"bytes,3,rep,name=linkStates,proto3" json:"linkStates,omitempty"` // link states of all known nodes, including the new node // contains filtered or unexported fields }
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) GetClientCert ¶
func (x *RegisterResponse) GetClientCert() []byte
func (*RegisterResponse) GetClusterCACert ¶
func (x *RegisterResponse) GetClusterCACert() []byte
func (*RegisterResponse) GetLinkStates ¶
func (x *RegisterResponse) GetLinkStates() []*LinkState
func (*RegisterResponse) MarshalJSON ¶
func (msg *RegisterResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
func (*RegisterResponse) UnmarshalJSON ¶
func (msg *RegisterResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type UnimplementedBroadcastServiceServer ¶
type UnimplementedBroadcastServiceServer struct { }
UnimplementedBroadcastServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedBroadcastServiceServer) Broadcast ¶
func (UnimplementedBroadcastServiceServer) Broadcast(context.Context, *MultiBroadcastRequest) (*emptypb.Empty, error)
type UnimplementedDqliteConnectionServer ¶
type UnimplementedDqliteConnectionServer struct { }
UnimplementedDqliteConnectionServer should be embedded to have forward compatible implementations.
func (UnimplementedDqliteConnectionServer) ServeDqlite ¶
func (UnimplementedDqliteConnectionServer) ServeDqlite(DqliteConnection_ServeDqliteServer) error
type UnimplementedInitializeServiceServer ¶
type UnimplementedInitializeServiceServer struct { }
UnimplementedInitializeServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedInitializeServiceServer) EstimateLatency ¶
func (UnimplementedInitializeServiceServer) EstimateLatency(context.Context, *EstimateLatencyRequest) (*EstimateLatencyResponse, error)
func (UnimplementedInitializeServiceServer) GetClusterInfo ¶
func (UnimplementedInitializeServiceServer) GetClusterInfo(context.Context, *emptypb.Empty) (*GetClusterInfoResponse, error)
func (UnimplementedInitializeServiceServer) Register ¶
func (UnimplementedInitializeServiceServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
func (UnimplementedInitializeServiceServer) UpdateLinkState ¶
func (UnimplementedInitializeServiceServer) UpdateLinkState(context.Context, *UpdateLinkStateRequest) (*UpdateLinkStateResponse, error)
type UnsafeBroadcastServiceServer ¶
type UnsafeBroadcastServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBroadcastServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BroadcastServiceServer will result in compilation errors.
type UnsafeDqliteConnectionServer ¶
type UnsafeDqliteConnectionServer interface {
// contains filtered or unexported methods
}
UnsafeDqliteConnectionServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DqliteConnectionServer will result in compilation errors.
type UnsafeInitializeServiceServer ¶
type UnsafeInitializeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeInitializeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InitializeServiceServer will result in compilation errors.
type UpdateLinkStateRequest ¶
type UpdateLinkStateRequest struct { // info of the resumed node, used to estimate the latency between the // resumed node and all other nodes in the cluster Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` ServerID string `protobuf:"bytes,3,opt,name=serverID,proto3" json:"serverID,omitempty"` // the link states from a resumed node LinkStates []*LinkState `protobuf:"bytes,4,rep,name=linkStates,proto3" json:"linkStates,omitempty"` // contains filtered or unexported fields }
func (*UpdateLinkStateRequest) Descriptor
deprecated
func (*UpdateLinkStateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateLinkStateRequest.ProtoReflect.Descriptor instead.
func (*UpdateLinkStateRequest) GetIp ¶
func (x *UpdateLinkStateRequest) GetIp() string
func (*UpdateLinkStateRequest) GetLinkStates ¶
func (x *UpdateLinkStateRequest) GetLinkStates() []*LinkState
func (*UpdateLinkStateRequest) GetPort ¶
func (x *UpdateLinkStateRequest) GetPort() int32
func (*UpdateLinkStateRequest) GetServerID ¶
func (x *UpdateLinkStateRequest) GetServerID() string
func (*UpdateLinkStateRequest) MarshalJSON ¶
func (msg *UpdateLinkStateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*UpdateLinkStateRequest) ProtoMessage ¶
func (*UpdateLinkStateRequest) ProtoMessage()
func (*UpdateLinkStateRequest) ProtoReflect ¶
func (x *UpdateLinkStateRequest) ProtoReflect() protoreflect.Message
func (*UpdateLinkStateRequest) Reset ¶
func (x *UpdateLinkStateRequest) Reset()
func (*UpdateLinkStateRequest) String ¶
func (x *UpdateLinkStateRequest) String() string
func (*UpdateLinkStateRequest) UnmarshalJSON ¶
func (msg *UpdateLinkStateRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
type UpdateLinkStateResponse ¶
type UpdateLinkStateResponse struct { // the link states of all known nodes, including the resumed node LinkStates []*LinkState `protobuf:"bytes,3,rep,name=linkStates,proto3" json:"linkStates,omitempty"` // contains filtered or unexported fields }
func (*UpdateLinkStateResponse) Descriptor
deprecated
func (*UpdateLinkStateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateLinkStateResponse.ProtoReflect.Descriptor instead.
func (*UpdateLinkStateResponse) GetLinkStates ¶
func (x *UpdateLinkStateResponse) GetLinkStates() []*LinkState
func (*UpdateLinkStateResponse) MarshalJSON ¶
func (msg *UpdateLinkStateResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*UpdateLinkStateResponse) ProtoMessage ¶
func (*UpdateLinkStateResponse) ProtoMessage()
func (*UpdateLinkStateResponse) ProtoReflect ¶
func (x *UpdateLinkStateResponse) ProtoReflect() protoreflect.Message
func (*UpdateLinkStateResponse) Reset ¶
func (x *UpdateLinkStateResponse) Reset()
func (*UpdateLinkStateResponse) String ¶
func (x *UpdateLinkStateResponse) String() string
func (*UpdateLinkStateResponse) UnmarshalJSON ¶
func (msg *UpdateLinkStateResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler