cble

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: GPL-3.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

View Source
const (
	CBLE_Handshake_FullMethodName          = "/CBLE/Handshake"
	CBLE_RegisterProvider_FullMethodName   = "/CBLE/RegisterProvider"
	CBLE_UnregisterProvider_FullMethodName = "/CBLE/UnregisterProvider"
)
View Source
const VERSION = "1.0.0"

Variables

View Source
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)

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 CBLEClientOptions struct {
	TLS    bool
	CAFile string
	Socket string
}

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 CBLEServerOptions struct {
	TLS      bool
	CertFile string
	KeyFile  string
	Socket   string
}

type DefaultCBLEServer

type DefaultCBLEServer struct {
	UnimplementedCBLEServer
}

func (DefaultCBLEServer) Handshake

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) RegisterProvider

func (UnimplementedCBLEServer) UnregisterProvider

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.

Jump to

Keyboard shortcuts

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