management

package
v0.8.66 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: Apache-2.0 Imports: 19 Imported by: 4

Documentation

Overview

Package management is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package management is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ControlPlane_ListInstanceRegistrations_FullMethodName = "/aserto.management.v2.ControlPlane/ListInstanceRegistrations"
	ControlPlane_ExecCommand_FullMethodName               = "/aserto.management.v2.ControlPlane/ExecCommand"
)
View Source
const (
	Controller_CommandStream_FullMethodName = "/aserto.management.v2.Controller/CommandStream"
)

Variables

View Source
var ControlPlane_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aserto.management.v2.ControlPlane",
	HandlerType: (*ControlPlaneServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListInstanceRegistrations",
			Handler:    _ControlPlane_ListInstanceRegistrations_Handler,
		},
		{
			MethodName: "ExecCommand",
			Handler:    _ControlPlane_ExecCommand_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "aserto/management/v2/control_plane.proto",
}

ControlPlane_ServiceDesc is the grpc.ServiceDesc for ControlPlane 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 Controller_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aserto.management.v2.Controller",
	HandlerType: (*ControllerServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "CommandStream",
			Handler:       _Controller_CommandStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "aserto/management/v2/controller.proto",
}

Controller_ServiceDesc is the grpc.ServiceDesc for Controller 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_aserto_management_v2_control_plane_proto protoreflect.FileDescriptor
View Source
var File_aserto_management_v2_controller_proto protoreflect.FileDescriptor

Functions

func RegisterControlPlaneHandler

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

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

func RegisterControlPlaneHandlerClient

func RegisterControlPlaneHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ControlPlaneClient) error

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

func RegisterControlPlaneHandlerFromEndpoint

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

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

func RegisterControlPlaneHandlerServer

func RegisterControlPlaneHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ControlPlaneServer) error

RegisterControlPlaneHandlerServer registers the http handlers for service ControlPlane to "mux". UnaryRPC :call ControlPlaneServer 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 RegisterControlPlaneHandlerFromEndpoint instead.

func RegisterControlPlaneServer

func RegisterControlPlaneServer(s grpc.ServiceRegistrar, srv ControlPlaneServer)

func RegisterControllerHandler

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

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

func RegisterControllerHandlerClient

func RegisterControllerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ControllerClient) error

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

func RegisterControllerHandlerFromEndpoint

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

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

func RegisterControllerHandlerServer

func RegisterControllerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ControllerServer) error

RegisterControllerHandlerServer registers the http handlers for service Controller to "mux". UnaryRPC :call ControllerServer 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 RegisterControllerHandlerFromEndpoint instead.

func RegisterControllerServer

func RegisterControllerServer(s grpc.ServiceRegistrar, srv ControllerServer)

Types

type CommandStreamRequest

type CommandStreamRequest struct {
	Info *v2.InstanceInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandStreamRequest) Descriptor deprecated

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

Deprecated: Use CommandStreamRequest.ProtoReflect.Descriptor instead.

func (*CommandStreamRequest) GetInfo

func (x *CommandStreamRequest) GetInfo() *v2.InstanceInfo

func (*CommandStreamRequest) ProtoMessage

func (*CommandStreamRequest) ProtoMessage()

func (*CommandStreamRequest) ProtoReflect

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

func (*CommandStreamRequest) Reset

func (x *CommandStreamRequest) Reset()

func (*CommandStreamRequest) String

func (x *CommandStreamRequest) String() string

type CommandStreamResponse

type CommandStreamResponse struct {
	Command *v2.Command `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandStreamResponse) Descriptor deprecated

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

Deprecated: Use CommandStreamResponse.ProtoReflect.Descriptor instead.

func (*CommandStreamResponse) GetCommand

func (x *CommandStreamResponse) GetCommand() *v2.Command

func (*CommandStreamResponse) ProtoMessage

func (*CommandStreamResponse) ProtoMessage()

func (*CommandStreamResponse) ProtoReflect

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

func (*CommandStreamResponse) Reset

func (x *CommandStreamResponse) Reset()

func (*CommandStreamResponse) String

func (x *CommandStreamResponse) String() string

type ControlPlaneClient

type ControlPlaneClient interface {
	ListInstanceRegistrations(ctx context.Context, in *ListInstanceRegistrationsRequest, opts ...grpc.CallOption) (*ListInstanceRegistrationsResponse, error)
	ExecCommand(ctx context.Context, in *ExecCommandRequest, opts ...grpc.CallOption) (*ExecCommandResponse, error)
}

ControlPlaneClient is the client API for ControlPlane 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 ControlPlaneServer

type ControlPlaneServer interface {
	ListInstanceRegistrations(context.Context, *ListInstanceRegistrationsRequest) (*ListInstanceRegistrationsResponse, error)
	ExecCommand(context.Context, *ExecCommandRequest) (*ExecCommandResponse, error)
}

ControlPlaneServer is the server API for ControlPlane service. All implementations should embed UnimplementedControlPlaneServer for forward compatibility

type ControllerClient

type ControllerClient interface {
	CommandStream(ctx context.Context, in *CommandStreamRequest, opts ...grpc.CallOption) (Controller_CommandStreamClient, error)
}

ControllerClient is the client API for Controller 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 NewControllerClient

func NewControllerClient(cc grpc.ClientConnInterface) ControllerClient

type ControllerServer

type ControllerServer interface {
	CommandStream(*CommandStreamRequest, Controller_CommandStreamServer) error
}

ControllerServer is the server API for Controller service. All implementations should embed UnimplementedControllerServer for forward compatibility

type Controller_CommandStreamClient

type Controller_CommandStreamClient interface {
	Recv() (*CommandStreamResponse, error)
	grpc.ClientStream
}

type Controller_CommandStreamServer

type Controller_CommandStreamServer interface {
	Send(*CommandStreamResponse) error
	grpc.ServerStream
}

type ExecCommandRequest

type ExecCommandRequest struct {
	Id      string      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Command *v2.Command `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecCommandRequest) Descriptor deprecated

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

Deprecated: Use ExecCommandRequest.ProtoReflect.Descriptor instead.

func (*ExecCommandRequest) GetCommand

func (x *ExecCommandRequest) GetCommand() *v2.Command

func (*ExecCommandRequest) GetId

func (x *ExecCommandRequest) GetId() string

func (*ExecCommandRequest) ProtoMessage

func (*ExecCommandRequest) ProtoMessage()

func (*ExecCommandRequest) ProtoReflect

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

func (*ExecCommandRequest) Reset

func (x *ExecCommandRequest) Reset()

func (*ExecCommandRequest) String

func (x *ExecCommandRequest) String() string

type ExecCommandResponse

type ExecCommandResponse struct {
	Result *emptypb.Empty `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecCommandResponse) Descriptor deprecated

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

Deprecated: Use ExecCommandResponse.ProtoReflect.Descriptor instead.

func (*ExecCommandResponse) GetResult

func (x *ExecCommandResponse) GetResult() *emptypb.Empty

func (*ExecCommandResponse) ProtoMessage

func (*ExecCommandResponse) ProtoMessage()

func (*ExecCommandResponse) ProtoReflect

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

func (*ExecCommandResponse) Reset

func (x *ExecCommandResponse) Reset()

func (*ExecCommandResponse) String

func (x *ExecCommandResponse) String() string

type ListInstanceRegistrationsRequest

type ListInstanceRegistrationsRequest struct {
	// contains filtered or unexported fields
}

func (*ListInstanceRegistrationsRequest) Descriptor deprecated

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

Deprecated: Use ListInstanceRegistrationsRequest.ProtoReflect.Descriptor instead.

func (*ListInstanceRegistrationsRequest) ProtoMessage

func (*ListInstanceRegistrationsRequest) ProtoMessage()

func (*ListInstanceRegistrationsRequest) ProtoReflect

func (*ListInstanceRegistrationsRequest) Reset

func (*ListInstanceRegistrationsRequest) String

type ListInstanceRegistrationsResponse

type ListInstanceRegistrationsResponse struct {
	Result []*v2.InstanceRegistration `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*ListInstanceRegistrationsResponse) Descriptor deprecated

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

Deprecated: Use ListInstanceRegistrationsResponse.ProtoReflect.Descriptor instead.

func (*ListInstanceRegistrationsResponse) GetResult

func (*ListInstanceRegistrationsResponse) ProtoMessage

func (*ListInstanceRegistrationsResponse) ProtoMessage()

func (*ListInstanceRegistrationsResponse) ProtoReflect

func (*ListInstanceRegistrationsResponse) Reset

func (*ListInstanceRegistrationsResponse) String

type UnimplementedControlPlaneServer

type UnimplementedControlPlaneServer struct {
}

UnimplementedControlPlaneServer should be embedded to have forward compatible implementations.

func (UnimplementedControlPlaneServer) ExecCommand

type UnimplementedControllerServer

type UnimplementedControllerServer struct {
}

UnimplementedControllerServer should be embedded to have forward compatible implementations.

func (UnimplementedControllerServer) CommandStream

type UnsafeControlPlaneServer

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

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

type UnsafeControllerServer

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

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

Jump to

Keyboard shortcuts

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