Documentation
¶
Index ¶
- Constants
- Variables
- func BootstrapServiceServer(server BootstrapServer) api.ServiceServer
- func RegisterBootstrapServer(s grpc.ServiceRegistrar, srv BootstrapServer)
- type BootstrapClient
- type BootstrapServer
- type BootstrapServiceClient
- type DeinitRequest
- type DeinitResponse
- type InitRequest
- type InitResponse
- type UnimplementedBootstrapServer
- type UnsafeBootstrapServer
Constants ¶
const ( Bootstrap_Init_FullMethodName = "/service.init.v1.Bootstrap/Init" Bootstrap_Deinit_FullMethodName = "/service.init.v1.Bootstrap/Deinit" )
const (
GRPCServiceFullName = "service.init.v1.Bootstrap"
)
Variables ¶
var Bootstrap_ServiceDesc = grpc.ServiceDesc{ ServiceName: "service.init.v1.Bootstrap", HandlerType: (*BootstrapServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Init", Handler: _Bootstrap_Init_Handler, }, { MethodName: "Deinit", Handler: _Bootstrap_Deinit_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/init/v1/init.proto", }
Bootstrap_ServiceDesc is the grpc.ServiceDesc for Bootstrap service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_service_init_v1_init_proto protoreflect.FileDescriptor
Functions ¶
func BootstrapServiceServer ¶
func BootstrapServiceServer(server BootstrapServer) api.ServiceServer
func RegisterBootstrapServer ¶
func RegisterBootstrapServer(s grpc.ServiceRegistrar, srv BootstrapServer)
Types ¶
type BootstrapClient ¶
type BootstrapClient interface {
Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error)
Deinit(ctx context.Context, in *DeinitRequest, opts ...grpc.CallOption) (*DeinitResponse, error)
}
BootstrapClient is the client API for Bootstrap 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.
Init is an internal service that the plugin framework uses to initialize a plugin after it has been loaded. Initialization takes place when the plugin client connects, since the client is responsible for hosting the broker that is used to provide host services. If we initialize before that, there would be no broker available to connect to host services with. The service is also used for graceful cleanup when the plugin is unloaded.
func NewBootstrapClient ¶
func NewBootstrapClient(cc grpc.ClientConnInterface) BootstrapClient
type BootstrapServer ¶
type BootstrapServer interface {
Init(context.Context, *InitRequest) (*InitResponse, error)
Deinit(context.Context, *DeinitRequest) (*DeinitResponse, error)
// contains filtered or unexported methods
}
BootstrapServer is the server API for Bootstrap service. All implementations must embed UnimplementedBootstrapServer for forward compatibility.
Init is an internal service that the plugin framework uses to initialize a plugin after it has been loaded. Initialization takes place when the plugin client connects, since the client is responsible for hosting the broker that is used to provide host services. If we initialize before that, there would be no broker available to connect to host services with. The service is also used for graceful cleanup when the plugin is unloaded.
type BootstrapServiceClient ¶
type BootstrapServiceClient struct {
BootstrapClient
}
func (*BootstrapServiceClient) GRPCServiceName ¶
func (c *BootstrapServiceClient) GRPCServiceName() string
func (*BootstrapServiceClient) InitClient ¶
func (c *BootstrapServiceClient) InitClient(conn grpc.ClientConnInterface) any
func (*BootstrapServiceClient) IsInitialized ¶
func (c *BootstrapServiceClient) IsInitialized() bool
type DeinitRequest ¶
type DeinitRequest struct {
// contains filtered or unexported fields
}
Deinit request parameters
func (*DeinitRequest) Descriptor
deprecated
func (*DeinitRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeinitRequest.ProtoReflect.Descriptor instead.
func (*DeinitRequest) ProtoMessage ¶
func (*DeinitRequest) ProtoMessage()
func (*DeinitRequest) ProtoReflect ¶
func (x *DeinitRequest) ProtoReflect() protoreflect.Message
func (*DeinitRequest) Reset ¶
func (x *DeinitRequest) Reset()
func (*DeinitRequest) String ¶
func (x *DeinitRequest) String() string
type DeinitResponse ¶
type DeinitResponse struct {
// contains filtered or unexported fields
}
Deinit response parameters
func (*DeinitResponse) Descriptor
deprecated
func (*DeinitResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeinitResponse.ProtoReflect.Descriptor instead.
func (*DeinitResponse) ProtoMessage ¶
func (*DeinitResponse) ProtoMessage()
func (*DeinitResponse) ProtoReflect ¶
func (x *DeinitResponse) ProtoReflect() protoreflect.Message
func (*DeinitResponse) Reset ¶
func (x *DeinitResponse) Reset()
func (*DeinitResponse) String ¶
func (x *DeinitResponse) String() string
type InitRequest ¶
type InitRequest struct {
// List of all the names of gRPC services implemented by the host.
// These names are the fully qualified gRPC service name.
HostServiceNames []string `protobuf:"bytes,1,rep,name=host_service_names,json=hostServiceNames,proto3" json:"host_service_names,omitempty"`
// contains filtered or unexported fields
}
Init request parameters
func (*InitRequest) Descriptor
deprecated
func (*InitRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitRequest.ProtoReflect.Descriptor instead.
func (*InitRequest) GetHostServiceNames ¶
func (x *InitRequest) GetHostServiceNames() []string
func (*InitRequest) ProtoMessage ¶
func (*InitRequest) ProtoMessage()
func (*InitRequest) ProtoReflect ¶
func (x *InitRequest) ProtoReflect() protoreflect.Message
func (*InitRequest) Reset ¶
func (x *InitRequest) Reset()
func (*InitRequest) String ¶
func (x *InitRequest) String() string
type InitResponse ¶
type InitResponse struct {
// List of all the names of gRPC services implemented by the service. These
// names are the fully qualified gRPC service name.
PluginServiceNames []string `protobuf:"bytes,1,rep,name=plugin_service_names,json=pluginServiceNames,proto3" json:"plugin_service_names,omitempty"`
// contains filtered or unexported fields
}
Init response parameters
func (*InitResponse) Descriptor
deprecated
func (*InitResponse) Descriptor() ([]byte, []int)
Deprecated: Use InitResponse.ProtoReflect.Descriptor instead.
func (*InitResponse) GetPluginServiceNames ¶
func (x *InitResponse) GetPluginServiceNames() []string
func (*InitResponse) ProtoMessage ¶
func (*InitResponse) ProtoMessage()
func (*InitResponse) ProtoReflect ¶
func (x *InitResponse) ProtoReflect() protoreflect.Message
func (*InitResponse) Reset ¶
func (x *InitResponse) Reset()
func (*InitResponse) String ¶
func (x *InitResponse) String() string
type UnimplementedBootstrapServer ¶
type UnimplementedBootstrapServer struct{}
UnimplementedBootstrapServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedBootstrapServer) Deinit ¶
func (UnimplementedBootstrapServer) Deinit(context.Context, *DeinitRequest) (*DeinitResponse, error)
func (UnimplementedBootstrapServer) Init ¶
func (UnimplementedBootstrapServer) Init(context.Context, *InitRequest) (*InitResponse, error)
type UnsafeBootstrapServer ¶
type UnsafeBootstrapServer interface {
// contains filtered or unexported methods
}
UnsafeBootstrapServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BootstrapServer will result in compilation errors.