Documentation ¶
Index ¶
- Constants
- Variables
- func Connect(options *CBLEClientOptions) (*grpc.ClientConn, error)
- func DefaultConnect() (*grpc.ClientConn, error)
- func DefaultServe(ctx context.Context, server CBLEServer) error
- func RegisterCBLEServer(s grpc.ServiceRegistrar, srv CBLEServer)
- func Serve(ctx context.Context, server CBLEServer, options *CBLEServerOptions) error
- type CBLEClient
- type CBLEClientOptions
- type CBLEServer
- type CBLEServerOptions
- type DefaultCBLEServer
- type ProviderFeatures
- func (*ProviderFeatures) Descriptor() ([]byte, []int)deprecated
- func (x *ProviderFeatures) GetConsole() bool
- func (x *ProviderFeatures) GetDeploy() bool
- func (x *ProviderFeatures) GetDestroy() bool
- func (*ProviderFeatures) ProtoMessage()
- func (x *ProviderFeatures) ProtoReflect() protoreflect.Message
- func (x *ProviderFeatures) Reset()
- func (x *ProviderFeatures) String() string
- type RegistrationReply
- func (*RegistrationReply) Descriptor() ([]byte, []int)deprecated
- func (x *RegistrationReply) GetSocketId() string
- func (x *RegistrationReply) GetSuccess() bool
- func (*RegistrationReply) ProtoMessage()
- func (x *RegistrationReply) ProtoReflect() protoreflect.Message
- func (x *RegistrationReply) Reset()
- func (x *RegistrationReply) String() string
- type RegistrationRequest
- func (*RegistrationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegistrationRequest) GetFeatures() *ProviderFeatures
- func (x *RegistrationRequest) GetId() string
- func (x *RegistrationRequest) GetName() string
- func (x *RegistrationRequest) GetVersion() string
- func (*RegistrationRequest) ProtoMessage()
- func (x *RegistrationRequest) ProtoReflect() protoreflect.Message
- func (x *RegistrationRequest) Reset()
- func (x *RegistrationRequest) String() string
- type UnimplementedCBLEServer
- func (UnimplementedCBLEServer) Handshake(context.Context, *common.HandshakeRequest) (*common.HandshakeReply, error)
- func (UnimplementedCBLEServer) RegisterProvider(context.Context, *RegistrationRequest) (*RegistrationReply, error)
- func (UnimplementedCBLEServer) UnregisterProvider(context.Context, *UnregistrationRequest) (*UnregistrationReply, error)
- type UnregistrationReply
- func (*UnregistrationReply) Descriptor() ([]byte, []int)deprecated
- func (x *UnregistrationReply) GetSuccess() bool
- func (*UnregistrationReply) ProtoMessage()
- func (x *UnregistrationReply) ProtoReflect() protoreflect.Message
- func (x *UnregistrationReply) Reset()
- func (x *UnregistrationReply) String() string
- type UnregistrationRequest
- func (*UnregistrationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UnregistrationRequest) GetId() string
- func (x *UnregistrationRequest) GetName() string
- func (x *UnregistrationRequest) GetVersion() string
- func (*UnregistrationRequest) ProtoMessage()
- func (x *UnregistrationRequest) ProtoReflect() protoreflect.Message
- func (x *UnregistrationRequest) Reset()
- func (x *UnregistrationRequest) String() string
- type UnsafeCBLEServer
Constants ¶
const ( CBLE_Handshake_FullMethodName = "/CBLE/Handshake" CBLE_RegisterProvider_FullMethodName = "/CBLE/RegisterProvider" CBLE_UnregisterProvider_FullMethodName = "/CBLE/UnregisterProvider" )
const VERSION = "1.0.0"
Variables ¶
var CBLE_ServiceDesc = grpc.ServiceDesc{ ServiceName: "CBLE", HandlerType: (*CBLEServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Handshake", Handler: _CBLE_Handshake_Handler, }, { MethodName: "RegisterProvider", Handler: _CBLE_RegisterProvider_Handler, }, { MethodName: "UnregisterProvider", Handler: _CBLE_UnregisterProvider_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cble.proto", }
CBLE_ServiceDesc is the grpc.ServiceDesc for CBLE service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cble_proto protoreflect.FileDescriptor
Functions ¶
func Connect ¶
func Connect(options *CBLEClientOptions) (*grpc.ClientConn, error)
Connect returns a CBLEServer gRPC connection to the CBLE gRPC server for use with the gRPC client
func DefaultConnect ¶
func DefaultConnect() (*grpc.ClientConn, error)
func DefaultServe ¶
func DefaultServe(ctx context.Context, server CBLEServer) error
func RegisterCBLEServer ¶
func RegisterCBLEServer(s grpc.ServiceRegistrar, srv CBLEServer)
func Serve ¶
func Serve(ctx context.Context, server CBLEServer, options *CBLEServerOptions) error
Serve is a blocking call which returns an error if unable to serve
Types ¶
type CBLEClient ¶
type CBLEClient interface { // (DO NOT MODIFY) Handshake(ctx context.Context, in *common.HandshakeRequest, opts ...grpc.CallOption) (*common.HandshakeReply, error) RegisterProvider(ctx context.Context, in *RegistrationRequest, opts ...grpc.CallOption) (*RegistrationReply, error) UnregisterProvider(ctx context.Context, in *UnregistrationRequest, opts ...grpc.CallOption) (*UnregistrationReply, error) }
CBLEClient is the client API for CBLE 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 NewCBLEClient ¶
func NewCBLEClient(cc grpc.ClientConnInterface) CBLEClient
func NewClient ¶
func NewClient(ctx context.Context, conn grpc.ClientConnInterface) (CBLEClient, error)
type CBLEClientOptions ¶
type CBLEServer ¶
type CBLEServer interface { // (DO NOT MODIFY) Handshake(context.Context, *common.HandshakeRequest) (*common.HandshakeReply, error) RegisterProvider(context.Context, *RegistrationRequest) (*RegistrationReply, error) UnregisterProvider(context.Context, *UnregistrationRequest) (*UnregistrationReply, error) // contains filtered or unexported methods }
CBLEServer is the server API for CBLE service. All implementations must embed UnimplementedCBLEServer for forward compatibility
type CBLEServerOptions ¶
type DefaultCBLEServer ¶
type DefaultCBLEServer struct {
UnimplementedCBLEServer
}
func (DefaultCBLEServer) Handshake ¶
func (s DefaultCBLEServer) Handshake(ctx context.Context, request *common.HandshakeRequest) (*common.HandshakeReply, error)
type ProviderFeatures ¶ added in v0.1.3
type ProviderFeatures struct { Deploy bool `protobuf:"varint,1,opt,name=deploy,proto3" json:"deploy,omitempty"` Destroy bool `protobuf:"varint,2,opt,name=destroy,proto3" json:"destroy,omitempty"` Console bool `protobuf:"varint,3,opt,name=console,proto3" json:"console,omitempty"` // contains filtered or unexported fields }
func (*ProviderFeatures) Descriptor
deprecated
added in
v0.1.3
func (*ProviderFeatures) Descriptor() ([]byte, []int)
Deprecated: Use ProviderFeatures.ProtoReflect.Descriptor instead.
func (*ProviderFeatures) GetConsole ¶ added in v0.1.3
func (x *ProviderFeatures) GetConsole() bool
func (*ProviderFeatures) GetDeploy ¶ added in v0.1.3
func (x *ProviderFeatures) GetDeploy() bool
func (*ProviderFeatures) GetDestroy ¶ added in v0.1.3
func (x *ProviderFeatures) GetDestroy() bool
func (*ProviderFeatures) ProtoMessage ¶ added in v0.1.3
func (*ProviderFeatures) ProtoMessage()
func (*ProviderFeatures) ProtoReflect ¶ added in v0.1.3
func (x *ProviderFeatures) ProtoReflect() protoreflect.Message
func (*ProviderFeatures) Reset ¶ added in v0.1.3
func (x *ProviderFeatures) Reset()
func (*ProviderFeatures) String ¶ added in v0.1.3
func (x *ProviderFeatures) String() string
type RegistrationReply ¶
type RegistrationReply struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` SocketId string `protobuf:"bytes,2,opt,name=socket_id,json=socketId,proto3" json:"socket_id,omitempty"` // contains filtered or unexported fields }
func (*RegistrationReply) Descriptor
deprecated
func (*RegistrationReply) Descriptor() ([]byte, []int)
Deprecated: Use RegistrationReply.ProtoReflect.Descriptor instead.
func (*RegistrationReply) GetSocketId ¶
func (x *RegistrationReply) GetSocketId() string
func (*RegistrationReply) GetSuccess ¶ added in v0.2.0
func (x *RegistrationReply) GetSuccess() bool
func (*RegistrationReply) ProtoMessage ¶
func (*RegistrationReply) ProtoMessage()
func (*RegistrationReply) ProtoReflect ¶
func (x *RegistrationReply) ProtoReflect() protoreflect.Message
func (*RegistrationReply) Reset ¶
func (x *RegistrationReply) Reset()
func (*RegistrationReply) String ¶
func (x *RegistrationReply) String() string
type RegistrationRequest ¶
type RegistrationRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` Features *ProviderFeatures `protobuf:"bytes,4,opt,name=features,proto3" json:"features,omitempty"` // contains filtered or unexported fields }
Registration
func (*RegistrationRequest) Descriptor
deprecated
func (*RegistrationRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegistrationRequest.ProtoReflect.Descriptor instead.
func (*RegistrationRequest) GetFeatures ¶
func (x *RegistrationRequest) GetFeatures() *ProviderFeatures
func (*RegistrationRequest) GetId ¶
func (x *RegistrationRequest) GetId() string
func (*RegistrationRequest) GetName ¶
func (x *RegistrationRequest) GetName() string
func (*RegistrationRequest) GetVersion ¶
func (x *RegistrationRequest) GetVersion() string
func (*RegistrationRequest) ProtoMessage ¶
func (*RegistrationRequest) ProtoMessage()
func (*RegistrationRequest) ProtoReflect ¶
func (x *RegistrationRequest) ProtoReflect() protoreflect.Message
func (*RegistrationRequest) Reset ¶
func (x *RegistrationRequest) Reset()
func (*RegistrationRequest) String ¶
func (x *RegistrationRequest) String() string
type UnimplementedCBLEServer ¶
type UnimplementedCBLEServer struct { }
UnimplementedCBLEServer must be embedded to have forward compatible implementations.
func (UnimplementedCBLEServer) Handshake ¶
func (UnimplementedCBLEServer) Handshake(context.Context, *common.HandshakeRequest) (*common.HandshakeReply, error)
func (UnimplementedCBLEServer) RegisterProvider ¶
func (UnimplementedCBLEServer) RegisterProvider(context.Context, *RegistrationRequest) (*RegistrationReply, error)
func (UnimplementedCBLEServer) UnregisterProvider ¶
func (UnimplementedCBLEServer) UnregisterProvider(context.Context, *UnregistrationRequest) (*UnregistrationReply, error)
type UnregistrationReply ¶
type UnregistrationReply struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*UnregistrationReply) Descriptor
deprecated
func (*UnregistrationReply) Descriptor() ([]byte, []int)
Deprecated: Use UnregistrationReply.ProtoReflect.Descriptor instead.
func (*UnregistrationReply) GetSuccess ¶ added in v0.2.0
func (x *UnregistrationReply) GetSuccess() bool
func (*UnregistrationReply) ProtoMessage ¶
func (*UnregistrationReply) ProtoMessage()
func (*UnregistrationReply) ProtoReflect ¶
func (x *UnregistrationReply) ProtoReflect() protoreflect.Message
func (*UnregistrationReply) Reset ¶
func (x *UnregistrationReply) Reset()
func (*UnregistrationReply) String ¶
func (x *UnregistrationReply) String() string
type UnregistrationRequest ¶
type UnregistrationRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
Unregistration
func (*UnregistrationRequest) Descriptor
deprecated
func (*UnregistrationRequest) Descriptor() ([]byte, []int)
Deprecated: Use UnregistrationRequest.ProtoReflect.Descriptor instead.
func (*UnregistrationRequest) GetId ¶
func (x *UnregistrationRequest) GetId() string
func (*UnregistrationRequest) GetName ¶
func (x *UnregistrationRequest) GetName() string
func (*UnregistrationRequest) GetVersion ¶
func (x *UnregistrationRequest) GetVersion() string
func (*UnregistrationRequest) ProtoMessage ¶
func (*UnregistrationRequest) ProtoMessage()
func (*UnregistrationRequest) ProtoReflect ¶
func (x *UnregistrationRequest) ProtoReflect() protoreflect.Message
func (*UnregistrationRequest) Reset ¶
func (x *UnregistrationRequest) Reset()
func (*UnregistrationRequest) String ¶
func (x *UnregistrationRequest) String() string
type UnsafeCBLEServer ¶
type UnsafeCBLEServer interface {
// contains filtered or unexported methods
}
UnsafeCBLEServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CBLEServer will result in compilation errors.