sandboxmanager

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SandboxManagerAPI_ApplySandbox_FullMethodName = "/sandboxmanager.SandboxManagerAPI/ApplySandbox"
	SandboxManagerAPI_Status_FullMethodName       = "/sandboxmanager.SandboxManagerAPI/Status"
	SandboxManagerAPI_Shutdown_FullMethodName     = "/sandboxmanager.SandboxManagerAPI/Shutdown"
)

Variables

View Source
var File_internal_locald_api_sandboxmanager_sandbox_manager_api_proto protoreflect.FileDescriptor
View Source
var SandboxManagerAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sandboxmanager.SandboxManagerAPI",
	HandlerType: (*SandboxManagerAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ApplySandbox",
			Handler:    _SandboxManagerAPI_ApplySandbox_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _SandboxManagerAPI_Status_Handler,
		},
		{
			MethodName: "Shutdown",
			Handler:    _SandboxManagerAPI_Shutdown_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/locald/api/sandboxmanager/sandbox_manager_api.proto",
}

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

Functions

func RegisterSandboxManagerAPIServer

func RegisterSandboxManagerAPIServer(s grpc.ServiceRegistrar, srv SandboxManagerAPIServer)

func StatusToMap

func StatusToMap(status *StatusResponse) (map[string]any, error)

func ToCIConfig

func ToCIConfig(grpcSpec *structpb.Struct) (*config.ConnectInvocationConfig, error)

func ToGRPCCIConfig

func ToGRPCCIConfig(ciConfig *config.ConnectInvocationConfig) (*structpb.Struct, error)

func ToGRPCSandbox

func ToGRPCSandbox(sb *models.Sandbox) (*structpb.Struct, error)

func ToGRPCSandboxSpec

func ToGRPCSandboxSpec(sbs *models.SandboxSpec) (*structpb.Struct, error)

func ToModelsSandbox

func ToModelsSandbox(grpcSandbox *structpb.Struct) (*models.Sandbox, error)

TODO maybe use generics here?

func ToModelsSandboxSpec

func ToModelsSandboxSpec(grpcSpec *structpb.Struct) (*models.SandboxSpec, error)

Types

type ApplySandboxRequest

type ApplySandboxRequest struct {

	// sandbox name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// sandbox spec (instance of github.com/signadot/go-sdk/models.SandboxSpec)
	SandboxSpec *_struct.Struct `protobuf:"bytes,2,opt,name=sandbox_spec,json=sandboxSpec,proto3" json:"sandbox_spec,omitempty"`
	// contains filtered or unexported fields
}

func (*ApplySandboxRequest) Descriptor deprecated

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

Deprecated: Use ApplySandboxRequest.ProtoReflect.Descriptor instead.

func (*ApplySandboxRequest) GetName

func (x *ApplySandboxRequest) GetName() string

func (*ApplySandboxRequest) GetSandboxSpec

func (x *ApplySandboxRequest) GetSandboxSpec() *_struct.Struct

func (*ApplySandboxRequest) ProtoMessage

func (*ApplySandboxRequest) ProtoMessage()

func (*ApplySandboxRequest) ProtoReflect

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

func (*ApplySandboxRequest) Reset

func (x *ApplySandboxRequest) Reset()

func (*ApplySandboxRequest) String

func (x *ApplySandboxRequest) String() string

type ApplySandboxResponse

type ApplySandboxResponse struct {

	// Types that are assignable to It:
	//
	//	*ApplySandboxResponse_Sandbox
	//	*ApplySandboxResponse_ApiError
	It isApplySandboxResponse_It `protobuf_oneof:"it"`
	// contains filtered or unexported fields
}

func APIErrorResponse

func APIErrorResponse(err error) *ApplySandboxResponse

func (*ApplySandboxResponse) Descriptor deprecated

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

Deprecated: Use ApplySandboxResponse.ProtoReflect.Descriptor instead.

func (*ApplySandboxResponse) GetApiError

func (x *ApplySandboxResponse) GetApiError() string

func (*ApplySandboxResponse) GetIt

func (m *ApplySandboxResponse) GetIt() isApplySandboxResponse_It

func (*ApplySandboxResponse) GetSandbox

func (x *ApplySandboxResponse) GetSandbox() *_struct.Struct

func (*ApplySandboxResponse) ProtoMessage

func (*ApplySandboxResponse) ProtoMessage()

func (*ApplySandboxResponse) ProtoReflect

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

func (*ApplySandboxResponse) Reset

func (x *ApplySandboxResponse) Reset()

func (*ApplySandboxResponse) String

func (x *ApplySandboxResponse) String() string

type ApplySandboxResponse_ApiError

type ApplySandboxResponse_ApiError struct {
	ApiError string `protobuf:"bytes,2,opt,name=apiError,proto3,oneof"`
}

type ApplySandboxResponse_Sandbox

type ApplySandboxResponse_Sandbox struct {
	// sandbox (instance of github.com/signadot/go-sdk/models.Sandbox)
	Sandbox *_struct.Struct `protobuf:"bytes,1,opt,name=sandbox,proto3,oneof"`
}

type SandboxManagerAPIClient

type SandboxManagerAPIClient interface {
	// This method is used to create a sandbox with local references.
	// The local controller (signadot local connect) should be running,
	// otherwise it will return an error
	ApplySandbox(ctx context.Context, in *ApplySandboxRequest, opts ...grpc.CallOption) (*ApplySandboxResponse, error)
	// This method returns the status of the local controller
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
	// This method requests the root controller to shutdown
	Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownResponse, error)
}

SandboxManagerAPIClient is the client API for SandboxManagerAPI 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 SandboxManagerAPIServer

type SandboxManagerAPIServer interface {
	// This method is used to create a sandbox with local references.
	// The local controller (signadot local connect) should be running,
	// otherwise it will return an error
	ApplySandbox(context.Context, *ApplySandboxRequest) (*ApplySandboxResponse, error)
	// This method returns the status of the local controller
	Status(context.Context, *StatusRequest) (*StatusResponse, error)
	// This method requests the root controller to shutdown
	Shutdown(context.Context, *ShutdownRequest) (*ShutdownResponse, error)
	// contains filtered or unexported methods
}

SandboxManagerAPIServer is the server API for SandboxManagerAPI service. All implementations must embed UnimplementedSandboxManagerAPIServer for forward compatibility

type ShutdownRequest

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

func (*ShutdownRequest) Descriptor deprecated

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

Deprecated: Use ShutdownRequest.ProtoReflect.Descriptor instead.

func (*ShutdownRequest) ProtoMessage

func (*ShutdownRequest) ProtoMessage()

func (*ShutdownRequest) ProtoReflect

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

func (*ShutdownRequest) Reset

func (x *ShutdownRequest) Reset()

func (*ShutdownRequest) String

func (x *ShutdownRequest) String() string

type ShutdownResponse

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

func (*ShutdownResponse) Descriptor deprecated

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

Deprecated: Use ShutdownResponse.ProtoReflect.Descriptor instead.

func (*ShutdownResponse) ProtoMessage

func (*ShutdownResponse) ProtoMessage()

func (*ShutdownResponse) ProtoReflect

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

func (*ShutdownResponse) Reset

func (x *ShutdownResponse) Reset()

func (*ShutdownResponse) String

func (x *ShutdownResponse) String() string

type StatusRequest

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

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

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

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {

	// connect invocation config
	// (instance of internal/config/locald.ConnectInvocationConfig)
	CiConfig    *_struct.Struct        `protobuf:"bytes,1,opt,name=ci_config,json=ciConfig,proto3" json:"ci_config,omitempty"`
	Localnet    *api.LocalNetStatus    `protobuf:"bytes,2,opt,name=localnet,proto3" json:"localnet,omitempty"`
	Hosts       *api.HostsStatus       `protobuf:"bytes,3,opt,name=hosts,proto3" json:"hosts,omitempty"`
	Portforward *api.PortForwardStatus `protobuf:"bytes,4,opt,name=portforward,proto3" json:"portforward,omitempty"`
	Sandboxes   []*api.SandboxStatus   `protobuf:"bytes,5,rep,name=sandboxes,proto3" json:"sandboxes,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusResponse) Descriptor deprecated

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetCiConfig

func (x *StatusResponse) GetCiConfig() *_struct.Struct

func (*StatusResponse) GetHosts

func (x *StatusResponse) GetHosts() *api.HostsStatus

func (*StatusResponse) GetLocalnet

func (x *StatusResponse) GetLocalnet() *api.LocalNetStatus

func (*StatusResponse) GetPortforward

func (x *StatusResponse) GetPortforward() *api.PortForwardStatus

func (*StatusResponse) GetSandboxes

func (x *StatusResponse) GetSandboxes() []*api.SandboxStatus

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

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

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type UnimplementedSandboxManagerAPIServer

type UnimplementedSandboxManagerAPIServer struct {
}

UnimplementedSandboxManagerAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedSandboxManagerAPIServer) ApplySandbox

func (UnimplementedSandboxManagerAPIServer) Shutdown

func (UnimplementedSandboxManagerAPIServer) Status

type UnsafeSandboxManagerAPIServer

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

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

Jump to

Keyboard shortcuts

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