sshforward

package
v0.18.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SSH_CheckAgent_FullMethodName   = "/moby.sshforward.v1.SSH/CheckAgent"
	SSH_ForwardAgent_FullMethodName = "/moby.sshforward.v1.SSH/ForwardAgent"
)
View Source
const DefaultID = "default"

DefaultID is the default ssh ID

View Source
const KeySSHID = "buildkit.ssh.id"

Variables

View Source
var File_github_com_moby_buildkit_session_sshforward_ssh_proto protoreflect.FileDescriptor
View Source
var SSH_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "moby.sshforward.v1.SSH",
	HandlerType: (*SSHServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CheckAgent",
			Handler:    _SSH_CheckAgent_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ForwardAgent",
			Handler:       _SSH_ForwardAgent_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "github.com/moby/buildkit/session/sshforward/ssh.proto",
}

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

Functions

func CheckSSHID

func CheckSSHID(ctx context.Context, c session.Caller, id string) error

func Copy

func Copy(ctx context.Context, conn io.ReadWriteCloser, stream Stream, closeStream func() error) error

func MountSSHSocket

func MountSSHSocket(ctx context.Context, c session.Caller, opt SocketOpt) (sockPath string, closer func() error, err error)

func RegisterSSHServer

func RegisterSSHServer(s grpc.ServiceRegistrar, srv SSHServer)

Types

type BytesMessage

type BytesMessage struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

BytesMessage contains a chunk of byte data

func (*BytesMessage) CloneMessageVT added in v0.17.0

func (m *BytesMessage) CloneMessageVT() proto.Message

func (*BytesMessage) CloneVT added in v0.17.0

func (m *BytesMessage) CloneVT() *BytesMessage

func (*BytesMessage) Descriptor deprecated

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

Deprecated: Use BytesMessage.ProtoReflect.Descriptor instead.

func (*BytesMessage) EqualMessageVT added in v0.17.0

func (this *BytesMessage) EqualMessageVT(thatMsg proto.Message) bool

func (*BytesMessage) EqualVT added in v0.17.0

func (this *BytesMessage) EqualVT(that *BytesMessage) bool

func (*BytesMessage) GetData

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

func (*BytesMessage) MarshalToSizedBufferVT added in v0.17.0

func (m *BytesMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*BytesMessage) MarshalToVT added in v0.17.0

func (m *BytesMessage) MarshalToVT(dAtA []byte) (int, error)

func (*BytesMessage) MarshalVT added in v0.17.0

func (m *BytesMessage) MarshalVT() (dAtA []byte, err error)

func (*BytesMessage) ProtoMessage

func (*BytesMessage) ProtoMessage()

func (*BytesMessage) ProtoReflect added in v0.17.0

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

func (*BytesMessage) Reset

func (x *BytesMessage) Reset()

func (*BytesMessage) SizeVT added in v0.17.0

func (m *BytesMessage) SizeVT() (n int)

func (*BytesMessage) String

func (x *BytesMessage) String() string

func (*BytesMessage) UnmarshalVT added in v0.17.0

func (m *BytesMessage) UnmarshalVT(dAtA []byte) error

type CheckAgentRequest

type CheckAgentRequest struct {
	ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckAgentRequest) CloneMessageVT added in v0.17.0

func (m *CheckAgentRequest) CloneMessageVT() proto.Message

func (*CheckAgentRequest) CloneVT added in v0.17.0

func (m *CheckAgentRequest) CloneVT() *CheckAgentRequest

func (*CheckAgentRequest) Descriptor deprecated

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

Deprecated: Use CheckAgentRequest.ProtoReflect.Descriptor instead.

func (*CheckAgentRequest) EqualMessageVT added in v0.17.0

func (this *CheckAgentRequest) EqualMessageVT(thatMsg proto.Message) bool

func (*CheckAgentRequest) EqualVT added in v0.17.0

func (this *CheckAgentRequest) EqualVT(that *CheckAgentRequest) bool

func (*CheckAgentRequest) GetID

func (x *CheckAgentRequest) GetID() string

func (*CheckAgentRequest) MarshalToSizedBufferVT added in v0.17.0

func (m *CheckAgentRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CheckAgentRequest) MarshalToVT added in v0.17.0

func (m *CheckAgentRequest) MarshalToVT(dAtA []byte) (int, error)

func (*CheckAgentRequest) MarshalVT added in v0.17.0

func (m *CheckAgentRequest) MarshalVT() (dAtA []byte, err error)

func (*CheckAgentRequest) ProtoMessage

func (*CheckAgentRequest) ProtoMessage()

func (*CheckAgentRequest) ProtoReflect added in v0.17.0

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

func (*CheckAgentRequest) Reset

func (x *CheckAgentRequest) Reset()

func (*CheckAgentRequest) SizeVT added in v0.17.0

func (m *CheckAgentRequest) SizeVT() (n int)

func (*CheckAgentRequest) String

func (x *CheckAgentRequest) String() string

func (*CheckAgentRequest) UnmarshalVT added in v0.17.0

func (m *CheckAgentRequest) UnmarshalVT(dAtA []byte) error

type CheckAgentResponse

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

func (*CheckAgentResponse) CloneMessageVT added in v0.17.0

func (m *CheckAgentResponse) CloneMessageVT() proto.Message

func (*CheckAgentResponse) CloneVT added in v0.17.0

func (m *CheckAgentResponse) CloneVT() *CheckAgentResponse

func (*CheckAgentResponse) Descriptor deprecated

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

Deprecated: Use CheckAgentResponse.ProtoReflect.Descriptor instead.

func (*CheckAgentResponse) EqualMessageVT added in v0.17.0

func (this *CheckAgentResponse) EqualMessageVT(thatMsg proto.Message) bool

func (*CheckAgentResponse) EqualVT added in v0.17.0

func (this *CheckAgentResponse) EqualVT(that *CheckAgentResponse) bool

func (*CheckAgentResponse) MarshalToSizedBufferVT added in v0.17.0

func (m *CheckAgentResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CheckAgentResponse) MarshalToVT added in v0.17.0

func (m *CheckAgentResponse) MarshalToVT(dAtA []byte) (int, error)

func (*CheckAgentResponse) MarshalVT added in v0.17.0

func (m *CheckAgentResponse) MarshalVT() (dAtA []byte, err error)

func (*CheckAgentResponse) ProtoMessage

func (*CheckAgentResponse) ProtoMessage()

func (*CheckAgentResponse) ProtoReflect added in v0.17.0

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

func (*CheckAgentResponse) Reset

func (x *CheckAgentResponse) Reset()

func (*CheckAgentResponse) SizeVT added in v0.17.0

func (m *CheckAgentResponse) SizeVT() (n int)

func (*CheckAgentResponse) String

func (x *CheckAgentResponse) String() string

func (*CheckAgentResponse) UnmarshalVT added in v0.17.0

func (m *CheckAgentResponse) UnmarshalVT(dAtA []byte) error

type SSHClient

type SSHClient interface {
	CheckAgent(ctx context.Context, in *CheckAgentRequest, opts ...grpc.CallOption) (*CheckAgentResponse, error)
	ForwardAgent(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[BytesMessage, BytesMessage], error)
}

SSHClient is the client API for SSH 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 NewSSHClient

func NewSSHClient(cc grpc.ClientConnInterface) SSHClient

type SSHServer

type SSHServer interface {
	CheckAgent(context.Context, *CheckAgentRequest) (*CheckAgentResponse, error)
	ForwardAgent(grpc.BidiStreamingServer[BytesMessage, BytesMessage]) error
}

SSHServer is the server API for SSH service. All implementations should embed UnimplementedSSHServer for forward compatibility.

type SSH_ForwardAgentClient

type SSH_ForwardAgentClient = grpc.BidiStreamingClient[BytesMessage, BytesMessage]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type SSH_ForwardAgentServer

type SSH_ForwardAgentServer = grpc.BidiStreamingServer[BytesMessage, BytesMessage]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type SocketOpt

type SocketOpt struct {
	ID   string
	UID  int
	GID  int
	Mode int
}

type Stream added in v0.8.0

type Stream interface {
	SendMsg(m interface{}) error
	RecvMsg(m interface{}) error
}

type UnimplementedSSHServer added in v0.7.0

type UnimplementedSSHServer struct{}

UnimplementedSSHServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedSSHServer) CheckAgent added in v0.7.0

func (UnimplementedSSHServer) ForwardAgent added in v0.7.0

type UnsafeSSHServer added in v0.17.0

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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