Documentation ¶
Overview ¶
Package orchestrator is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterTopologyOrchestratorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTopologyOrchestratorHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TopologyOrchestratorClient) error
- func RegisterTopologyOrchestratorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTopologyOrchestratorHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TopologyOrchestratorServer) error
- func RegisterTopologyOrchestratorServer(s grpc.ServiceRegistrar, srv TopologyOrchestratorServer)
- type InstallState
- func (InstallState) Descriptor() protoreflect.EnumDescriptor
- func (x InstallState) Enum() *InstallState
- func (InstallState) EnumDescriptor() ([]byte, []int)deprecated
- func (x InstallState) Number() protoreflect.EnumNumber
- func (x InstallState) String() string
- func (InstallState) Type() protoreflect.EnumType
- type InstallStatus
- func (*InstallStatus) Descriptor() ([]byte, []int)deprecated
- func (x *InstallStatus) GetMetadata() map[string]string
- func (x *InstallStatus) GetState() InstallState
- func (x *InstallStatus) GetVersion() string
- func (*InstallStatus) ProtoMessage()
- func (x *InstallStatus) ProtoReflect() protoreflect.Message
- func (x *InstallStatus) Reset()
- func (x *InstallStatus) String() string
- type TopologyOrchestratorClient
- type TopologyOrchestratorServer
- type UnimplementedTopologyOrchestratorServer
- type UnsafeTopologyOrchestratorServer
Constants ¶
This section is empty.
Variables ¶
var ( InstallState_name = map[int32]string{ 0: "Unknown", 1: "NotInstalled", 2: "Updating", 3: "Installed", 4: "Uninstalling", } InstallState_value = map[string]int32{ "Unknown": 0, "NotInstalled": 1, "Updating": 2, "Installed": 3, "Uninstalling": 4, } )
Enum value maps for InstallState.
var File_github_com_rancher_opni_pkg_plugins_topology_pkg_apis_orchestrator_orchestrator_proto protoreflect.FileDescriptor
var TopologyOrchestrator_ServiceDesc = grpc.ServiceDesc{ ServiceName: "orchestrator.TopologyOrchestrator", HandlerType: (*TopologyOrchestratorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetClusterStatus", Handler: _TopologyOrchestrator_GetClusterStatus_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/rancher/opni/pkg/plugins/topology/pkg/apis/orchestrator/orchestrator.proto", }
TopologyOrchestrator_ServiceDesc is the grpc.ServiceDesc for TopologyOrchestrator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTopologyOrchestratorHandler ¶
func RegisterTopologyOrchestratorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTopologyOrchestratorHandler registers the http handlers for service TopologyOrchestrator to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTopologyOrchestratorHandlerClient ¶
func RegisterTopologyOrchestratorHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TopologyOrchestratorClient) error
RegisterTopologyOrchestratorHandlerClient registers the http handlers for service TopologyOrchestrator to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TopologyOrchestratorClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TopologyOrchestratorClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TopologyOrchestratorClient" to call the correct interceptors.
func RegisterTopologyOrchestratorHandlerFromEndpoint ¶
func RegisterTopologyOrchestratorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTopologyOrchestratorHandlerFromEndpoint is same as RegisterTopologyOrchestratorHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTopologyOrchestratorHandlerServer ¶
func RegisterTopologyOrchestratorHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TopologyOrchestratorServer) error
RegisterTopologyOrchestratorHandlerServer registers the http handlers for service TopologyOrchestrator to "mux". UnaryRPC :call TopologyOrchestratorServer 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 RegisterTopologyOrchestratorHandlerFromEndpoint instead.
func RegisterTopologyOrchestratorServer ¶
func RegisterTopologyOrchestratorServer(s grpc.ServiceRegistrar, srv TopologyOrchestratorServer)
Types ¶
type InstallState ¶
type InstallState int32
const ( InstallState_Unknown InstallState = 0 InstallState_NotInstalled InstallState = 1 InstallState_Updating InstallState = 2 InstallState_Installed InstallState = 3 InstallState_Uninstalling InstallState = 4 )
func (InstallState) Descriptor ¶
func (InstallState) Descriptor() protoreflect.EnumDescriptor
func (InstallState) Enum ¶
func (x InstallState) Enum() *InstallState
func (InstallState) EnumDescriptor
deprecated
func (InstallState) EnumDescriptor() ([]byte, []int)
Deprecated: Use InstallState.Descriptor instead.
func (InstallState) Number ¶
func (x InstallState) Number() protoreflect.EnumNumber
func (InstallState) String ¶
func (x InstallState) String() string
func (InstallState) Type ¶
func (InstallState) Type() protoreflect.EnumType
type InstallStatus ¶
type InstallStatus struct { State InstallState `protobuf:"varint,1,opt,name=state,proto3,enum=orchestrator.InstallState" json:"state,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*InstallStatus) Descriptor
deprecated
func (*InstallStatus) Descriptor() ([]byte, []int)
Deprecated: Use InstallStatus.ProtoReflect.Descriptor instead.
func (*InstallStatus) GetMetadata ¶
func (x *InstallStatus) GetMetadata() map[string]string
func (*InstallStatus) GetState ¶
func (x *InstallStatus) GetState() InstallState
func (*InstallStatus) GetVersion ¶
func (x *InstallStatus) GetVersion() string
func (*InstallStatus) ProtoMessage ¶
func (*InstallStatus) ProtoMessage()
func (*InstallStatus) ProtoReflect ¶
func (x *InstallStatus) ProtoReflect() protoreflect.Message
func (*InstallStatus) Reset ¶
func (x *InstallStatus) Reset()
func (*InstallStatus) String ¶
func (x *InstallStatus) String() string
type TopologyOrchestratorClient ¶
type TopologyOrchestratorClient interface {
GetClusterStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InstallStatus, error)
}
TopologyOrchestratorClient is the client API for TopologyOrchestrator 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 NewTopologyOrchestratorClient ¶
func NewTopologyOrchestratorClient(cc grpc.ClientConnInterface) TopologyOrchestratorClient
type TopologyOrchestratorServer ¶
type TopologyOrchestratorServer interface { GetClusterStatus(context.Context, *emptypb.Empty) (*InstallStatus, error) // contains filtered or unexported methods }
TopologyOrchestratorServer is the server API for TopologyOrchestrator service. All implementations must embed UnimplementedTopologyOrchestratorServer for forward compatibility
type UnimplementedTopologyOrchestratorServer ¶
type UnimplementedTopologyOrchestratorServer struct { }
UnimplementedTopologyOrchestratorServer must be embedded to have forward compatible implementations.
func (UnimplementedTopologyOrchestratorServer) GetClusterStatus ¶
func (UnimplementedTopologyOrchestratorServer) GetClusterStatus(context.Context, *emptypb.Empty) (*InstallStatus, error)
type UnsafeTopologyOrchestratorServer ¶
type UnsafeTopologyOrchestratorServer interface {
// contains filtered or unexported methods
}
UnsafeTopologyOrchestratorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TopologyOrchestratorServer will result in compilation errors.