admin

package
v0.8.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package admin is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var AIAdmin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admin.AIAdmin",
	HandlerType: (*AIAdminServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAISettings",
			Handler:    _AIAdmin_GetAISettings_Handler,
		},
		{
			MethodName: "PutAISettings",
			Handler:    _AIAdmin_PutAISettings_Handler,
		},
		{
			MethodName: "DeleteAISettings",
			Handler:    _AIAdmin_DeleteAISettings_Handler,
		},
		{
			MethodName: "UpgradeAvailable",
			Handler:    _AIAdmin_UpgradeAvailable_Handler,
		},
		{
			MethodName: "DoUpgrade",
			Handler:    _AIAdmin_DoUpgrade_Handler,
		},
		{
			MethodName: "GetRuntimeClasses",
			Handler:    _AIAdmin_GetRuntimeClasses_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/plugins/aiops/pkg/apis/admin/admin.proto",
}

AIAdmin_ServiceDesc is the grpc.ServiceDesc for AIAdmin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_github_com_rancher_opni_plugins_aiops_pkg_apis_admin_admin_proto protoreflect.FileDescriptor

Functions

func RegisterAIAdminHandler

func RegisterAIAdminHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAIAdminHandler registers the http handlers for service AIAdmin to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAIAdminHandlerClient

func RegisterAIAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AIAdminClient) error

RegisterAIAdminHandlerClient registers the http handlers for service AIAdmin to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AIAdminClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AIAdminClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AIAdminClient" to call the correct interceptors.

func RegisterAIAdminHandlerFromEndpoint

func RegisterAIAdminHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAIAdminHandlerFromEndpoint is same as RegisterAIAdminHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAIAdminHandlerServer

func RegisterAIAdminHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AIAdminServer) error

RegisterAIAdminHandlerServer registers the http handlers for service AIAdmin to "mux". UnaryRPC :call AIAdminServer 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 RegisterAIAdminHandlerFromEndpoint instead.

func RegisterAIAdminServer

func RegisterAIAdminServer(s grpc.ServiceRegistrar, srv AIAdminServer)

Types

type AIAdminClient

type AIAdminClient interface {
	GetAISettings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*AISettings, error)
	PutAISettings(ctx context.Context, in *AISettings, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteAISettings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UpgradeAvailable(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UpgradeAvailableResponse, error)
	DoUpgrade(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetRuntimeClasses(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RuntimeClassResponse, error)
}

AIAdminClient is the client API for AIAdmin 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 NewAIAdminClient

func NewAIAdminClient(cc grpc.ClientConnInterface) AIAdminClient

type AIAdminServer

type AIAdminServer interface {
	GetAISettings(context.Context, *emptypb.Empty) (*AISettings, error)
	PutAISettings(context.Context, *AISettings) (*emptypb.Empty, error)
	DeleteAISettings(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	UpgradeAvailable(context.Context, *emptypb.Empty) (*UpgradeAvailableResponse, error)
	DoUpgrade(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	GetRuntimeClasses(context.Context, *emptypb.Empty) (*RuntimeClassResponse, error)
	// contains filtered or unexported methods
}

AIAdminServer is the server API for AIAdmin service. All implementations must embed UnimplementedAIAdminServer for forward compatibility

type AISettings

type AISettings struct {
	GpuSettings   *GPUSettings     `protobuf:"bytes,1,opt,name=gpuSettings,proto3,oneof" json:"gpuSettings,omitempty"`
	DrainReplicas *int32           `protobuf:"varint,2,opt,name=drainReplicas,proto3,oneof" json:"drainReplicas,omitempty"`
	Controlplane  *PretrainedModel `protobuf:"bytes,3,opt,name=controlplane,proto3,oneof" json:"controlplane,omitempty"`
	Rancher       *PretrainedModel `protobuf:"bytes,4,opt,name=rancher,proto3,oneof" json:"rancher,omitempty"`
	Longhorn      *PretrainedModel `protobuf:"bytes,5,opt,name=longhorn,proto3,oneof" json:"longhorn,omitempty"`
	// contains filtered or unexported fields
}

func (*AISettings) Descriptor deprecated

func (*AISettings) Descriptor() ([]byte, []int)

Deprecated: Use AISettings.ProtoReflect.Descriptor instead.

func (*AISettings) GetControlplane

func (x *AISettings) GetControlplane() *PretrainedModel

func (*AISettings) GetDrainReplicas

func (x *AISettings) GetDrainReplicas() int32

func (*AISettings) GetGpuSettings

func (x *AISettings) GetGpuSettings() *GPUSettings

func (*AISettings) GetLonghorn

func (x *AISettings) GetLonghorn() *PretrainedModel

func (*AISettings) GetRancher

func (x *AISettings) GetRancher() *PretrainedModel

func (*AISettings) ProtoMessage

func (*AISettings) ProtoMessage()

func (*AISettings) ProtoReflect

func (x *AISettings) ProtoReflect() protoreflect.Message

func (*AISettings) Reset

func (x *AISettings) Reset()

func (*AISettings) String

func (x *AISettings) String() string

type GPUSettings

type GPUSettings struct {
	RuntimeClass *string `protobuf:"bytes,1,opt,name=runtimeClass,proto3,oneof" json:"runtimeClass,omitempty"`
	// contains filtered or unexported fields
}

func (*GPUSettings) Descriptor deprecated

func (*GPUSettings) Descriptor() ([]byte, []int)

Deprecated: Use GPUSettings.ProtoReflect.Descriptor instead.

func (*GPUSettings) GetRuntimeClass

func (x *GPUSettings) GetRuntimeClass() string

func (*GPUSettings) ProtoMessage

func (*GPUSettings) ProtoMessage()

func (*GPUSettings) ProtoReflect

func (x *GPUSettings) ProtoReflect() protoreflect.Message

func (*GPUSettings) Reset

func (x *GPUSettings) Reset()

func (*GPUSettings) String

func (x *GPUSettings) String() string

type PretrainedModel

type PretrainedModel struct {
	HttpSource  *string `protobuf:"bytes,2,opt,name=httpSource,proto3,oneof" json:"httpSource,omitempty"`
	ImageSource *string `protobuf:"bytes,3,opt,name=imageSource,proto3,oneof" json:"imageSource,omitempty"`
	Replicas    *int32  `protobuf:"varint,4,opt,name=replicas,proto3,oneof" json:"replicas,omitempty"`
	// contains filtered or unexported fields
}

func (*PretrainedModel) Descriptor deprecated

func (*PretrainedModel) Descriptor() ([]byte, []int)

Deprecated: Use PretrainedModel.ProtoReflect.Descriptor instead.

func (*PretrainedModel) GetHttpSource

func (x *PretrainedModel) GetHttpSource() string

func (*PretrainedModel) GetImageSource

func (x *PretrainedModel) GetImageSource() string

func (*PretrainedModel) GetReplicas

func (x *PretrainedModel) GetReplicas() int32

func (*PretrainedModel) ProtoMessage

func (*PretrainedModel) ProtoMessage()

func (*PretrainedModel) ProtoReflect

func (x *PretrainedModel) ProtoReflect() protoreflect.Message

func (*PretrainedModel) Reset

func (x *PretrainedModel) Reset()

func (*PretrainedModel) String

func (x *PretrainedModel) String() string

type RuntimeClassResponse

type RuntimeClassResponse struct {
	RuntimeClasses []string `protobuf:"bytes,1,rep,name=RuntimeClasses,proto3" json:"RuntimeClasses,omitempty"`
	// contains filtered or unexported fields
}

func (*RuntimeClassResponse) Descriptor deprecated

func (*RuntimeClassResponse) Descriptor() ([]byte, []int)

Deprecated: Use RuntimeClassResponse.ProtoReflect.Descriptor instead.

func (*RuntimeClassResponse) GetRuntimeClasses

func (x *RuntimeClassResponse) GetRuntimeClasses() []string

func (*RuntimeClassResponse) ProtoMessage

func (*RuntimeClassResponse) ProtoMessage()

func (*RuntimeClassResponse) ProtoReflect

func (x *RuntimeClassResponse) ProtoReflect() protoreflect.Message

func (*RuntimeClassResponse) Reset

func (x *RuntimeClassResponse) Reset()

func (*RuntimeClassResponse) String

func (x *RuntimeClassResponse) String() string

type UnimplementedAIAdminServer

type UnimplementedAIAdminServer struct {
}

UnimplementedAIAdminServer must be embedded to have forward compatible implementations.

func (UnimplementedAIAdminServer) DeleteAISettings

func (UnimplementedAIAdminServer) DoUpgrade

func (UnimplementedAIAdminServer) GetAISettings

func (UnimplementedAIAdminServer) GetRuntimeClasses

func (UnimplementedAIAdminServer) PutAISettings

func (UnimplementedAIAdminServer) UpgradeAvailable

type UnsafeAIAdminServer

type UnsafeAIAdminServer interface {
	// contains filtered or unexported methods
}

UnsafeAIAdminServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AIAdminServer will result in compilation errors.

type UpgradeAvailableResponse

type UpgradeAvailableResponse struct {
	UpgradePending *bool `protobuf:"varint,1,opt,name=UpgradePending,proto3,oneof" json:"UpgradePending,omitempty"`
	// contains filtered or unexported fields
}

func (*UpgradeAvailableResponse) Descriptor deprecated

func (*UpgradeAvailableResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpgradeAvailableResponse.ProtoReflect.Descriptor instead.

func (*UpgradeAvailableResponse) GetUpgradePending

func (x *UpgradeAvailableResponse) GetUpgradePending() bool

func (*UpgradeAvailableResponse) ProtoMessage

func (*UpgradeAvailableResponse) ProtoMessage()

func (*UpgradeAvailableResponse) ProtoReflect

func (x *UpgradeAvailableResponse) ProtoReflect() protoreflect.Message

func (*UpgradeAvailableResponse) Reset

func (x *UpgradeAvailableResponse) Reset()

func (*UpgradeAvailableResponse) String

func (x *UpgradeAvailableResponse) String() string

Jump to

Keyboard shortcuts

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