v1

package
v0.1.367 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	CopyFilesSourceType_name = map[int32]string{
		0: "COPY_FILES_SOURCE_TYPE_UNSPECIFIED",
		1: "COPY_FILES_SOURCE_TYPE_SINGLE_FILE",
		2: "COPY_FILES_SOURCE_TYPE_SINGLE_DIRECTORY",
		3: "COPY_FILES_SOURCE_TYPE_MULTIPLE_FILES",
	}
	CopyFilesSourceType_value = map[string]int32{
		"COPY_FILES_SOURCE_TYPE_UNSPECIFIED":      0,
		"COPY_FILES_SOURCE_TYPE_SINGLE_FILE":      1,
		"COPY_FILES_SOURCE_TYPE_SINGLE_DIRECTORY": 2,
		"COPY_FILES_SOURCE_TYPE_MULTIPLE_FILES":   3,
	}
)

Enum value maps for CopyFilesSourceType.

View Source
var File_service_shell_v1_shell_proto protoreflect.FileDescriptor
View Source
var ShellService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "viam.service.shell.v1.ShellService",
	HandlerType: (*ShellServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "DoCommand",
			Handler:    _ShellService_DoCommand_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Shell",
			Handler:       _ShellService_Shell_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "CopyFilesToMachine",
			Handler:       _ShellService_CopyFilesToMachine_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "CopyFilesFromMachine",
			Handler:       _ShellService_CopyFilesFromMachine_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "service/shell/v1/shell.proto",
}

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

Functions

func RegisterShellServiceHandler

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

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

func RegisterShellServiceHandlerClient

func RegisterShellServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ShellServiceClient) error

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

func RegisterShellServiceHandlerFromEndpoint

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

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

func RegisterShellServiceHandlerServer

func RegisterShellServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ShellServiceServer) error

RegisterShellServiceHandlerServer registers the http handlers for service ShellService to "mux". UnaryRPC :call ShellServiceServer 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 RegisterShellServiceHandlerFromEndpoint instead.

func RegisterShellServiceServer

func RegisterShellServiceServer(s grpc.ServiceRegistrar, srv ShellServiceServer)

Types

type CopyFilesFromMachineRequest added in v0.1.292

type CopyFilesFromMachineRequest struct {

	// Types that are assignable to Request:
	//
	//	*CopyFilesFromMachineRequest_Metadata
	//	*CopyFilesFromMachineRequest_AckLastFile
	Request isCopyFilesFromMachineRequest_Request `protobuf_oneof:"request"`
	// contains filtered or unexported fields
}

func (*CopyFilesFromMachineRequest) Descriptor deprecated added in v0.1.292

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

Deprecated: Use CopyFilesFromMachineRequest.ProtoReflect.Descriptor instead.

func (*CopyFilesFromMachineRequest) GetAckLastFile added in v0.1.292

func (x *CopyFilesFromMachineRequest) GetAckLastFile() bool

func (*CopyFilesFromMachineRequest) GetMetadata added in v0.1.292

func (*CopyFilesFromMachineRequest) GetRequest added in v0.1.292

func (m *CopyFilesFromMachineRequest) GetRequest() isCopyFilesFromMachineRequest_Request

func (*CopyFilesFromMachineRequest) ProtoMessage added in v0.1.292

func (*CopyFilesFromMachineRequest) ProtoMessage()

func (*CopyFilesFromMachineRequest) ProtoReflect added in v0.1.292

func (*CopyFilesFromMachineRequest) Reset added in v0.1.292

func (x *CopyFilesFromMachineRequest) Reset()

func (*CopyFilesFromMachineRequest) String added in v0.1.292

func (x *CopyFilesFromMachineRequest) String() string

type CopyFilesFromMachineRequestMetadata added in v0.1.292

type CopyFilesFromMachineRequestMetadata struct {

	// name is the service name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// paths are the paths to copy from and send back over the wire.
	Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"`
	// allow_recursion indicates if directories should be recursed into. If
	// a directory is encountered and this is false, an error MUST occur.
	AllowRecursion bool `protobuf:"varint,3,opt,name=allow_recursion,json=allowRecursion,proto3" json:"allow_recursion,omitempty"`
	// preserve indicates the the receiver should provide the metadata in the file
	// to reflect the same state in the sender's filesystem as applicable.
	Preserve bool `protobuf:"varint,4,opt,name=preserve,proto3" json:"preserve,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*CopyFilesFromMachineRequestMetadata) Descriptor deprecated added in v0.1.292

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

Deprecated: Use CopyFilesFromMachineRequestMetadata.ProtoReflect.Descriptor instead.

func (*CopyFilesFromMachineRequestMetadata) GetAllowRecursion added in v0.1.292

func (x *CopyFilesFromMachineRequestMetadata) GetAllowRecursion() bool

func (*CopyFilesFromMachineRequestMetadata) GetExtra added in v0.1.292

func (*CopyFilesFromMachineRequestMetadata) GetName added in v0.1.292

func (*CopyFilesFromMachineRequestMetadata) GetPaths added in v0.1.292

func (*CopyFilesFromMachineRequestMetadata) GetPreserve added in v0.1.292

func (x *CopyFilesFromMachineRequestMetadata) GetPreserve() bool

func (*CopyFilesFromMachineRequestMetadata) ProtoMessage added in v0.1.292

func (*CopyFilesFromMachineRequestMetadata) ProtoMessage()

func (*CopyFilesFromMachineRequestMetadata) ProtoReflect added in v0.1.292

func (*CopyFilesFromMachineRequestMetadata) Reset added in v0.1.292

func (*CopyFilesFromMachineRequestMetadata) String added in v0.1.292

type CopyFilesFromMachineRequest_AckLastFile added in v0.1.292

type CopyFilesFromMachineRequest_AckLastFile struct {
	// ack_last_file is sent only after metadata and after each file has been received.
	// The value does not matter.
	AckLastFile bool `protobuf:"varint,2,opt,name=ack_last_file,json=ackLastFile,proto3,oneof"`
}

type CopyFilesFromMachineRequest_Metadata added in v0.1.292

type CopyFilesFromMachineRequest_Metadata struct {
	// metadata is sent first and only once.
	Metadata *CopyFilesFromMachineRequestMetadata `protobuf:"bytes,1,opt,name=metadata,proto3,oneof"`
}

type CopyFilesFromMachineResponse added in v0.1.292

type CopyFilesFromMachineResponse struct {

	// Types that are assignable to Response:
	//
	//	*CopyFilesFromMachineResponse_Metadata
	//	*CopyFilesFromMachineResponse_FileData
	Response isCopyFilesFromMachineResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

func (*CopyFilesFromMachineResponse) Descriptor deprecated added in v0.1.292

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

Deprecated: Use CopyFilesFromMachineResponse.ProtoReflect.Descriptor instead.

func (*CopyFilesFromMachineResponse) GetFileData added in v0.1.292

func (x *CopyFilesFromMachineResponse) GetFileData() *FileData

func (*CopyFilesFromMachineResponse) GetMetadata added in v0.1.292

func (*CopyFilesFromMachineResponse) GetResponse added in v0.1.292

func (m *CopyFilesFromMachineResponse) GetResponse() isCopyFilesFromMachineResponse_Response

func (*CopyFilesFromMachineResponse) ProtoMessage added in v0.1.292

func (*CopyFilesFromMachineResponse) ProtoMessage()

func (*CopyFilesFromMachineResponse) ProtoReflect added in v0.1.292

func (*CopyFilesFromMachineResponse) Reset added in v0.1.292

func (x *CopyFilesFromMachineResponse) Reset()

func (*CopyFilesFromMachineResponse) String added in v0.1.292

type CopyFilesFromMachineResponseMetadata added in v0.1.292

type CopyFilesFromMachineResponseMetadata struct {

	// source_type is the type of files that will be transmitted in this response stream.
	SourceType CopyFilesSourceType `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CopyFilesFromMachineResponseMetadata) Descriptor deprecated added in v0.1.292

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

Deprecated: Use CopyFilesFromMachineResponseMetadata.ProtoReflect.Descriptor instead.

func (*CopyFilesFromMachineResponseMetadata) GetSourceType added in v0.1.292

func (*CopyFilesFromMachineResponseMetadata) ProtoMessage added in v0.1.292

func (*CopyFilesFromMachineResponseMetadata) ProtoMessage()

func (*CopyFilesFromMachineResponseMetadata) ProtoReflect added in v0.1.292

func (*CopyFilesFromMachineResponseMetadata) Reset added in v0.1.292

func (*CopyFilesFromMachineResponseMetadata) String added in v0.1.292

type CopyFilesFromMachineResponse_FileData added in v0.1.292

type CopyFilesFromMachineResponse_FileData struct {
	// file_data is sent only after metadata. All data MUST be sent
	// in order per-file.
	FileData *FileData `protobuf:"bytes,2,opt,name=file_data,json=fileData,proto3,oneof"`
}

type CopyFilesFromMachineResponse_Metadata added in v0.1.292

type CopyFilesFromMachineResponse_Metadata struct {
	// metadata is sent first and only once.
	Metadata *CopyFilesFromMachineResponseMetadata `protobuf:"bytes,1,opt,name=metadata,proto3,oneof"`
}

type CopyFilesSourceType added in v0.1.292

type CopyFilesSourceType int32

CopyFilesSourceType indicates what will be copied. It's important to disambiguate the single directory case from the multiple files case in order to indicate that the user's intent is to copy a directory into a single location which may result in a new top-level directory versus the cause of multiples files that always go into the existing target destination.

const (
	CopyFilesSourceType_COPY_FILES_SOURCE_TYPE_UNSPECIFIED      CopyFilesSourceType = 0
	CopyFilesSourceType_COPY_FILES_SOURCE_TYPE_SINGLE_FILE      CopyFilesSourceType = 1
	CopyFilesSourceType_COPY_FILES_SOURCE_TYPE_SINGLE_DIRECTORY CopyFilesSourceType = 2
	CopyFilesSourceType_COPY_FILES_SOURCE_TYPE_MULTIPLE_FILES   CopyFilesSourceType = 3
)

func (CopyFilesSourceType) Descriptor added in v0.1.292

func (CopyFilesSourceType) Enum added in v0.1.292

func (CopyFilesSourceType) EnumDescriptor deprecated added in v0.1.292

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

Deprecated: Use CopyFilesSourceType.Descriptor instead.

func (CopyFilesSourceType) Number added in v0.1.292

func (CopyFilesSourceType) String added in v0.1.292

func (x CopyFilesSourceType) String() string

func (CopyFilesSourceType) Type added in v0.1.292

type CopyFilesToMachineRequest added in v0.1.292

type CopyFilesToMachineRequest struct {

	// Types that are assignable to Request:
	//
	//	*CopyFilesToMachineRequest_Metadata
	//	*CopyFilesToMachineRequest_FileData
	Request isCopyFilesToMachineRequest_Request `protobuf_oneof:"request"`
	// contains filtered or unexported fields
}

func (*CopyFilesToMachineRequest) Descriptor deprecated added in v0.1.292

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

Deprecated: Use CopyFilesToMachineRequest.ProtoReflect.Descriptor instead.

func (*CopyFilesToMachineRequest) GetFileData added in v0.1.292

func (x *CopyFilesToMachineRequest) GetFileData() *FileData

func (*CopyFilesToMachineRequest) GetMetadata added in v0.1.292

func (*CopyFilesToMachineRequest) GetRequest added in v0.1.292

func (m *CopyFilesToMachineRequest) GetRequest() isCopyFilesToMachineRequest_Request

func (*CopyFilesToMachineRequest) ProtoMessage added in v0.1.292

func (*CopyFilesToMachineRequest) ProtoMessage()

func (*CopyFilesToMachineRequest) ProtoReflect added in v0.1.292

func (*CopyFilesToMachineRequest) Reset added in v0.1.292

func (x *CopyFilesToMachineRequest) Reset()

func (*CopyFilesToMachineRequest) String added in v0.1.292

func (x *CopyFilesToMachineRequest) String() string

type CopyFilesToMachineRequestMetadata added in v0.1.292

type CopyFilesToMachineRequestMetadata struct {

	// name is the service name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// source_type is the type of files that will be transmitted in this request stream.
	SourceType CopyFilesSourceType `` /* 139-byte string literal not displayed */
	// destination is where the files should be placed. The receiver can choose to
	// reasonably modify this destination based on its implementation semantics.
	Destination string `protobuf:"bytes,3,opt,name=destination,proto3" json:"destination,omitempty"`
	// preserve indicates the the receiver should use the metadata in the file to reflect
	// the same state in its filesystem as applicable.
	Preserve bool `protobuf:"varint,4,opt,name=preserve,proto3" json:"preserve,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*CopyFilesToMachineRequestMetadata) Descriptor deprecated added in v0.1.292

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

Deprecated: Use CopyFilesToMachineRequestMetadata.ProtoReflect.Descriptor instead.

func (*CopyFilesToMachineRequestMetadata) GetDestination added in v0.1.292

func (x *CopyFilesToMachineRequestMetadata) GetDestination() string

func (*CopyFilesToMachineRequestMetadata) GetExtra added in v0.1.292

func (*CopyFilesToMachineRequestMetadata) GetName added in v0.1.292

func (*CopyFilesToMachineRequestMetadata) GetPreserve added in v0.1.292

func (x *CopyFilesToMachineRequestMetadata) GetPreserve() bool

func (*CopyFilesToMachineRequestMetadata) GetSourceType added in v0.1.292

func (*CopyFilesToMachineRequestMetadata) ProtoMessage added in v0.1.292

func (*CopyFilesToMachineRequestMetadata) ProtoMessage()

func (*CopyFilesToMachineRequestMetadata) ProtoReflect added in v0.1.292

func (*CopyFilesToMachineRequestMetadata) Reset added in v0.1.292

func (*CopyFilesToMachineRequestMetadata) String added in v0.1.292

type CopyFilesToMachineRequest_FileData added in v0.1.292

type CopyFilesToMachineRequest_FileData struct {
	// file_data is sent only after metadata. All data MUST be sent
	// in order per-file.
	FileData *FileData `protobuf:"bytes,2,opt,name=file_data,json=fileData,proto3,oneof"`
}

type CopyFilesToMachineRequest_Metadata added in v0.1.292

type CopyFilesToMachineRequest_Metadata struct {
	// metadata is sent first and only once.
	Metadata *CopyFilesToMachineRequestMetadata `protobuf:"bytes,1,opt,name=metadata,proto3,oneof"`
}

type CopyFilesToMachineResponse added in v0.1.292

type CopyFilesToMachineResponse struct {

	// value does not matter here but responses must be sent after every
	// file has been received.
	AckLastFile bool `protobuf:"varint,1,opt,name=ack_last_file,json=ackLastFile,proto3" json:"ack_last_file,omitempty"`
	// contains filtered or unexported fields
}

func (*CopyFilesToMachineResponse) Descriptor deprecated added in v0.1.292

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

Deprecated: Use CopyFilesToMachineResponse.ProtoReflect.Descriptor instead.

func (*CopyFilesToMachineResponse) GetAckLastFile added in v0.1.292

func (x *CopyFilesToMachineResponse) GetAckLastFile() bool

func (*CopyFilesToMachineResponse) ProtoMessage added in v0.1.292

func (*CopyFilesToMachineResponse) ProtoMessage()

func (*CopyFilesToMachineResponse) ProtoReflect added in v0.1.292

func (*CopyFilesToMachineResponse) Reset added in v0.1.292

func (x *CopyFilesToMachineResponse) Reset()

func (*CopyFilesToMachineResponse) String added in v0.1.292

func (x *CopyFilesToMachineResponse) String() string

type FileData added in v0.1.292

type FileData struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Size  int64  `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	IsDir bool   `protobuf:"varint,3,opt,name=is_dir,json=isDir,proto3" json:"is_dir,omitempty"`
	Data  []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	Eof   bool   `protobuf:"varint,5,opt,name=eof,proto3" json:"eof,omitempty"`
	// Note(erd): maybe support access time in the future if needed
	ModTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=mod_time,json=modTime,proto3,oneof" json:"mod_time,omitempty"`
	Mode    *uint32                `protobuf:"varint,7,opt,name=mode,proto3,oneof" json:"mode,omitempty"`
	// contains filtered or unexported fields
}

FileData contains partial (sometimes complete) information about a File. When transmitting FileData with CopyFilesToMachine and CopyFilesFromMachine, it MUST initially contain its name, size, and is_dir. Depending on whether preservation is in use, the mod_time and mode fields may be initially set as well. On all transmissions, data and eof must be set. Because files are sent one-by-one, it is currently permitted to exclude the initially set fields. If this ever changes, a new scheme should be used for identifying files (like a number) in order to reduce data transmission while allowing out-of-order transfers. eof must be true and its own message once no more data is to be sent for this file.

func (*FileData) Descriptor deprecated added in v0.1.292

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

Deprecated: Use FileData.ProtoReflect.Descriptor instead.

func (*FileData) GetData added in v0.1.292

func (x *FileData) GetData() []byte

func (*FileData) GetEof added in v0.1.292

func (x *FileData) GetEof() bool

func (*FileData) GetIsDir added in v0.1.292

func (x *FileData) GetIsDir() bool

func (*FileData) GetModTime added in v0.1.292

func (x *FileData) GetModTime() *timestamppb.Timestamp

func (*FileData) GetMode added in v0.1.292

func (x *FileData) GetMode() uint32

func (*FileData) GetName added in v0.1.292

func (x *FileData) GetName() string

func (*FileData) GetSize added in v0.1.292

func (x *FileData) GetSize() int64

func (*FileData) ProtoMessage added in v0.1.292

func (*FileData) ProtoMessage()

func (*FileData) ProtoReflect added in v0.1.292

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

func (*FileData) Reset added in v0.1.292

func (x *FileData) Reset()

func (*FileData) String added in v0.1.292

func (x *FileData) String() string

type ShellRequest

type ShellRequest struct {
	Name   string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	DataIn string `protobuf:"bytes,2,opt,name=data_in,json=dataIn,proto3" json:"data_in,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*ShellRequest) Descriptor deprecated

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

Deprecated: Use ShellRequest.ProtoReflect.Descriptor instead.

func (*ShellRequest) GetDataIn

func (x *ShellRequest) GetDataIn() string

func (*ShellRequest) GetExtra added in v0.1.6

func (x *ShellRequest) GetExtra() *structpb.Struct

func (*ShellRequest) GetName

func (x *ShellRequest) GetName() string

func (*ShellRequest) ProtoMessage

func (*ShellRequest) ProtoMessage()

func (*ShellRequest) ProtoReflect

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

func (*ShellRequest) Reset

func (x *ShellRequest) Reset()

func (*ShellRequest) String

func (x *ShellRequest) String() string

type ShellResponse

type ShellResponse struct {
	DataOut string `protobuf:"bytes,1,opt,name=data_out,json=dataOut,proto3" json:"data_out,omitempty"`
	DataErr string `protobuf:"bytes,2,opt,name=data_err,json=dataErr,proto3" json:"data_err,omitempty"`
	Eof     bool   `protobuf:"varint,3,opt,name=eof,proto3" json:"eof,omitempty"`
	// contains filtered or unexported fields
}

func (*ShellResponse) Descriptor deprecated

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

Deprecated: Use ShellResponse.ProtoReflect.Descriptor instead.

func (*ShellResponse) GetDataErr

func (x *ShellResponse) GetDataErr() string

func (*ShellResponse) GetDataOut

func (x *ShellResponse) GetDataOut() string

func (*ShellResponse) GetEof

func (x *ShellResponse) GetEof() bool

func (*ShellResponse) ProtoMessage

func (*ShellResponse) ProtoMessage()

func (*ShellResponse) ProtoReflect

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

func (*ShellResponse) Reset

func (x *ShellResponse) Reset()

func (*ShellResponse) String

func (x *ShellResponse) String() string

type ShellServiceClient

type ShellServiceClient interface {
	// Shell starts a shell with an input and output pipe.
	Shell(ctx context.Context, opts ...grpc.CallOption) (ShellService_ShellClient, error)
	// CopyFilesToMachines copies a stream of files from a client to the connected-to machine.
	// Initially, metadata is sent to describe the destination in the filesystem in addition
	// to what kind of file(s) are being sent.
	// Once metadata is sent, the file transfer can proceed where one-by-one, file data is sent
	// until EOF per file.
	// After each file is sent, the machine must respond with an ACK before the next file can
	// be sent. This provides back-pressure and ordering.
	// The order in which individual files are sent does not matter; that is, if traversing a
	// directory, copying depth-first, breadth-first, or any other algorithm does not matter.
	// Permissions and metadata on files copied are only preserved if the preserve option is
	// set in the initial request metadata.
	CopyFilesToMachine(ctx context.Context, opts ...grpc.CallOption) (ShellService_CopyFilesToMachineClient, error)
	// CopyFilesFromMachine copies a stream of files from a connected-to machine to the calling client.
	// Essentially, it is the inverse of CopyFilesToMachine with the same ACK mechanism in reverse.
	// The initial metadata request will request the paths to copy along with if permissions should
	// be preserved (and consequently sent over the wire).
	CopyFilesFromMachine(ctx context.Context, opts ...grpc.CallOption) (ShellService_CopyFilesFromMachineClient, error)
	// DoCommand sends/receives arbitrary commands
	DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error)
}

ShellServiceClient is the client API for ShellService 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 ShellServiceServer

type ShellServiceServer interface {
	// Shell starts a shell with an input and output pipe.
	Shell(ShellService_ShellServer) error
	// CopyFilesToMachines copies a stream of files from a client to the connected-to machine.
	// Initially, metadata is sent to describe the destination in the filesystem in addition
	// to what kind of file(s) are being sent.
	// Once metadata is sent, the file transfer can proceed where one-by-one, file data is sent
	// until EOF per file.
	// After each file is sent, the machine must respond with an ACK before the next file can
	// be sent. This provides back-pressure and ordering.
	// The order in which individual files are sent does not matter; that is, if traversing a
	// directory, copying depth-first, breadth-first, or any other algorithm does not matter.
	// Permissions and metadata on files copied are only preserved if the preserve option is
	// set in the initial request metadata.
	CopyFilesToMachine(ShellService_CopyFilesToMachineServer) error
	// CopyFilesFromMachine copies a stream of files from a connected-to machine to the calling client.
	// Essentially, it is the inverse of CopyFilesToMachine with the same ACK mechanism in reverse.
	// The initial metadata request will request the paths to copy along with if permissions should
	// be preserved (and consequently sent over the wire).
	CopyFilesFromMachine(ShellService_CopyFilesFromMachineServer) error
	// DoCommand sends/receives arbitrary commands
	DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error)
	// contains filtered or unexported methods
}

ShellServiceServer is the server API for ShellService service. All implementations must embed UnimplementedShellServiceServer for forward compatibility

type ShellService_CopyFilesFromMachineClient added in v0.1.292

type ShellService_CopyFilesFromMachineClient interface {
	Send(*CopyFilesFromMachineRequest) error
	Recv() (*CopyFilesFromMachineResponse, error)
	grpc.ClientStream
}

type ShellService_CopyFilesFromMachineServer added in v0.1.292

type ShellService_CopyFilesFromMachineServer interface {
	Send(*CopyFilesFromMachineResponse) error
	Recv() (*CopyFilesFromMachineRequest, error)
	grpc.ServerStream
}

type ShellService_CopyFilesToMachineClient added in v0.1.292

type ShellService_CopyFilesToMachineClient interface {
	Send(*CopyFilesToMachineRequest) error
	Recv() (*CopyFilesToMachineResponse, error)
	grpc.ClientStream
}

type ShellService_CopyFilesToMachineServer added in v0.1.292

type ShellService_CopyFilesToMachineServer interface {
	Send(*CopyFilesToMachineResponse) error
	Recv() (*CopyFilesToMachineRequest, error)
	grpc.ServerStream
}

type ShellService_ShellClient

type ShellService_ShellClient interface {
	Send(*ShellRequest) error
	Recv() (*ShellResponse, error)
	grpc.ClientStream
}

type ShellService_ShellServer

type ShellService_ShellServer interface {
	Send(*ShellResponse) error
	Recv() (*ShellRequest, error)
	grpc.ServerStream
}

type UnimplementedShellServiceServer

type UnimplementedShellServiceServer struct {
}

UnimplementedShellServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedShellServiceServer) CopyFilesFromMachine added in v0.1.292

func (UnimplementedShellServiceServer) CopyFilesToMachine added in v0.1.292

func (UnimplementedShellServiceServer) DoCommand added in v0.1.80

func (UnimplementedShellServiceServer) Shell

type UnsafeShellServiceServer

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

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

Jump to

Keyboard shortcuts

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