orchestrator

package
v0.8.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package orchestrator is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

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

View Source
var File_github_com_rancher_opni_pkg_plugins_topology_pkg_apis_orchestrator_orchestrator_proto protoreflect.FileDescriptor
View Source
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) Enum

func (x InstallState) Enum() *InstallState

func (InstallState) EnumDescriptor deprecated

func (InstallState) EnumDescriptor() ([]byte, []int)

Deprecated: Use InstallState.Descriptor instead.

func (InstallState) Number

func (InstallState) String

func (x InstallState) String() string

func (InstallState) Type

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.

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

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.

Jump to

Keyboard shortcuts

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