Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterExampleAPIExtensionServer(s grpc.ServiceRegistrar, srv ExampleAPIExtensionServer)
- func RegisterExampleUnaryExtensionServer(s grpc.ServiceRegistrar, srv ExampleUnaryExtensionServer)
- func Scheme(ctx context.Context) meta.Scheme
- type EchoRequest
- type EchoResponse
- type ExampleAPIExtensionClient
- type ExampleAPIExtensionServer
- type ExamplePlugin
- func (s *ExamplePlugin) CanInstall(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (s *ExamplePlugin) CancelUninstall(_ context.Context, ref *corev1.Reference) (*emptypb.Empty, error)
- func (s *ExamplePlugin) ConfigureRoutes(app *gin.Engine)
- func (s *ExamplePlugin) Echo(_ context.Context, req *EchoRequest) (*EchoResponse, error)
- func (s *ExamplePlugin) Hello(context.Context, *emptypb.Empty) (*EchoResponse, error)
- func (s *ExamplePlugin) Info(context.Context, *emptypb.Empty) (*capabilityv1.Details, error)
- func (s *ExamplePlugin) Install(ctx context.Context, req *capabilityv1.InstallRequest) (*capabilityv1.InstallResponse, error)
- func (s *ExamplePlugin) InstallerTemplate(context.Context, *emptypb.Empty) (*capabilityv1.InstallerTemplateResponse, error)
- func (s *ExamplePlugin) Status(ctx context.Context, ref *corev1.Reference) (*capabilityv1.NodeCapabilityStatus, error)
- func (s *ExamplePlugin) Uninstall(ctx context.Context, req *capabilityv1.UninstallRequest) (*emptypb.Empty, error)
- func (s *ExamplePlugin) UninstallStatus(_ context.Context, ref *corev1.Reference) (*corev1.TaskStatus, error)
- func (s *ExamplePlugin) UseCachingProvider(cacheProvider caching.CachingProvider[proto.Message])
- func (s *ExamplePlugin) UseKeyValueStore(client system.KeyValueStoreClient)
- func (s *ExamplePlugin) UseManagementAPI(client managementv1.ManagementClient)
- type ExampleUnaryExtensionClient
- type ExampleUnaryExtensionServer
- type UnimplementedExampleAPIExtensionServer
- type UnimplementedExampleUnaryExtensionServer
- type UnsafeExampleAPIExtensionServer
- type UnsafeExampleUnaryExtensionServer
Constants ¶
const (
ExampleAPIExtension_Echo_FullMethodName = "/example.ExampleAPIExtension/Echo"
)
const (
ExampleUnaryExtension_Hello_FullMethodName = "/example.ExampleUnaryExtension/Hello"
)
Variables ¶
var ExampleAPIExtension_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.ExampleAPIExtension", HandlerType: (*ExampleAPIExtensionServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Echo", Handler: _ExampleAPIExtension_Echo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/rancher/opni/plugins/example/pkg/example/example.proto", }
ExampleAPIExtension_ServiceDesc is the grpc.ServiceDesc for ExampleAPIExtension service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ExampleUnaryExtension_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.ExampleUnaryExtension", HandlerType: (*ExampleUnaryExtensionServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Hello", Handler: _ExampleUnaryExtension_Hello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/rancher/opni/plugins/example/pkg/example/example.proto", }
ExampleUnaryExtension_ServiceDesc is the grpc.ServiceDesc for ExampleUnaryExtension service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_github_com_rancher_opni_plugins_example_pkg_example_example_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExampleAPIExtensionServer ¶
func RegisterExampleAPIExtensionServer(s grpc.ServiceRegistrar, srv ExampleAPIExtensionServer)
func RegisterExampleUnaryExtensionServer ¶ added in v0.5.4
func RegisterExampleUnaryExtensionServer(s grpc.ServiceRegistrar, srv ExampleUnaryExtensionServer)
Types ¶
type EchoRequest ¶
type EchoRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoRequest) Descriptor
deprecated
func (*EchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
func (*EchoRequest) GetMessage ¶
func (x *EchoRequest) GetMessage() string
func (*EchoRequest) ProtoMessage ¶
func (*EchoRequest) ProtoMessage()
func (*EchoRequest) ProtoReflect ¶
func (x *EchoRequest) ProtoReflect() protoreflect.Message
func (*EchoRequest) Reset ¶
func (x *EchoRequest) Reset()
func (*EchoRequest) String ¶
func (x *EchoRequest) String() string
type EchoResponse ¶
type EchoResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoResponse) Descriptor
deprecated
func (*EchoResponse) Descriptor() ([]byte, []int)
Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.
func (*EchoResponse) GetMessage ¶
func (x *EchoResponse) GetMessage() string
func (*EchoResponse) ProtoMessage ¶
func (*EchoResponse) ProtoMessage()
func (*EchoResponse) ProtoReflect ¶
func (x *EchoResponse) ProtoReflect() protoreflect.Message
func (*EchoResponse) Reset ¶
func (x *EchoResponse) Reset()
func (*EchoResponse) String ¶
func (x *EchoResponse) String() string
type ExampleAPIExtensionClient ¶
type ExampleAPIExtensionClient interface {
Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error)
}
ExampleAPIExtensionClient is the client API for ExampleAPIExtension 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 NewExampleAPIExtensionClient ¶
func NewExampleAPIExtensionClient(cc grpc.ClientConnInterface) ExampleAPIExtensionClient
type ExampleAPIExtensionServer ¶
type ExampleAPIExtensionServer interface { Echo(context.Context, *EchoRequest) (*EchoResponse, error) // contains filtered or unexported methods }
ExampleAPIExtensionServer is the server API for ExampleAPIExtension service. All implementations must embed UnimplementedExampleAPIExtensionServer for forward compatibility
type ExamplePlugin ¶
type ExamplePlugin struct { UnsafeExampleAPIExtensionServer UnsafeExampleUnaryExtensionServer capabilityv1.UnsafeBackendServer system.UnimplementedSystemPluginClient // contains filtered or unexported fields }
func (*ExamplePlugin) CanInstall ¶
func (*ExamplePlugin) CancelUninstall ¶ added in v0.6.0
func (*ExamplePlugin) ConfigureRoutes ¶
func (s *ExamplePlugin) ConfigureRoutes(app *gin.Engine)
func (*ExamplePlugin) Echo ¶
func (s *ExamplePlugin) Echo(_ context.Context, req *EchoRequest) (*EchoResponse, error)
func (*ExamplePlugin) Hello ¶ added in v0.5.4
func (s *ExamplePlugin) Hello(context.Context, *emptypb.Empty) (*EchoResponse, error)
func (*ExamplePlugin) Info ¶ added in v0.6.0
func (s *ExamplePlugin) Info(context.Context, *emptypb.Empty) (*capabilityv1.Details, error)
func (*ExamplePlugin) Install ¶
func (s *ExamplePlugin) Install(ctx context.Context, req *capabilityv1.InstallRequest) (*capabilityv1.InstallResponse, error)
func (*ExamplePlugin) InstallerTemplate ¶
func (s *ExamplePlugin) InstallerTemplate(context.Context, *emptypb.Empty) (*capabilityv1.InstallerTemplateResponse, error)
func (*ExamplePlugin) Status ¶ added in v0.6.0
func (s *ExamplePlugin) Status(ctx context.Context, ref *corev1.Reference) (*capabilityv1.NodeCapabilityStatus, error)
func (*ExamplePlugin) Uninstall ¶ added in v0.4.2
func (s *ExamplePlugin) Uninstall(ctx context.Context, req *capabilityv1.UninstallRequest) (*emptypb.Empty, error)
func (*ExamplePlugin) UninstallStatus ¶ added in v0.6.0
func (s *ExamplePlugin) UninstallStatus(_ context.Context, ref *corev1.Reference) (*corev1.TaskStatus, error)
func (*ExamplePlugin) UseCachingProvider ¶ added in v0.9.2
func (s *ExamplePlugin) UseCachingProvider(cacheProvider caching.CachingProvider[proto.Message])
func (*ExamplePlugin) UseKeyValueStore ¶
func (s *ExamplePlugin) UseKeyValueStore(client system.KeyValueStoreClient)
func (*ExamplePlugin) UseManagementAPI ¶
func (s *ExamplePlugin) UseManagementAPI(client managementv1.ManagementClient)
type ExampleUnaryExtensionClient ¶ added in v0.5.4
type ExampleUnaryExtensionClient interface {
Hello(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*EchoResponse, error)
}
ExampleUnaryExtensionClient is the client API for ExampleUnaryExtension 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 NewExampleUnaryExtensionClient ¶ added in v0.5.4
func NewExampleUnaryExtensionClient(cc grpc.ClientConnInterface) ExampleUnaryExtensionClient
type ExampleUnaryExtensionServer ¶ added in v0.5.4
type ExampleUnaryExtensionServer interface { Hello(context.Context, *emptypb.Empty) (*EchoResponse, error) // contains filtered or unexported methods }
ExampleUnaryExtensionServer is the server API for ExampleUnaryExtension service. All implementations must embed UnimplementedExampleUnaryExtensionServer for forward compatibility
type UnimplementedExampleAPIExtensionServer ¶
type UnimplementedExampleAPIExtensionServer struct { }
UnimplementedExampleAPIExtensionServer must be embedded to have forward compatible implementations.
func (UnimplementedExampleAPIExtensionServer) Echo ¶
func (UnimplementedExampleAPIExtensionServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error)
type UnimplementedExampleUnaryExtensionServer ¶ added in v0.5.4
type UnimplementedExampleUnaryExtensionServer struct { }
UnimplementedExampleUnaryExtensionServer must be embedded to have forward compatible implementations.
func (UnimplementedExampleUnaryExtensionServer) Hello ¶ added in v0.5.4
func (UnimplementedExampleUnaryExtensionServer) Hello(context.Context, *emptypb.Empty) (*EchoResponse, error)
type UnsafeExampleAPIExtensionServer ¶
type UnsafeExampleAPIExtensionServer interface {
// contains filtered or unexported methods
}
UnsafeExampleAPIExtensionServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleAPIExtensionServer will result in compilation errors.
type UnsafeExampleUnaryExtensionServer ¶ added in v0.5.4
type UnsafeExampleUnaryExtensionServer interface {
// contains filtered or unexported methods
}
UnsafeExampleUnaryExtensionServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleUnaryExtensionServer will result in compilation errors.