package sshforward
import "github.com/moby/buildkit/session/sshforward"
Index ¶
- Constants
- Variables
- func CheckSSHID(ctx context.Context, c session.Caller, id string) error
- func Copy(ctx context.Context, conn io.ReadWriteCloser, stream Stream, closeStream func() error) error
- func MountSSHSocket(ctx context.Context, c session.Caller, opt SocketOpt) (sockPath string, closer func() error, err error)
- func RegisterSSHServer(s grpc.ServiceRegistrar, srv SSHServer)
- type BytesMessage
- func (m *BytesMessage) CloneMessageVT() proto.Message
- func (m *BytesMessage) CloneVT() *BytesMessage
- func (*BytesMessage) Descriptor() ([]byte, []int)
- func (this *BytesMessage) EqualMessageVT(thatMsg proto.Message) bool
- func (this *BytesMessage) EqualVT(that *BytesMessage) bool
- func (x *BytesMessage) GetData() []byte
- func (m *BytesMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *BytesMessage) MarshalToVT(dAtA []byte) (int, error)
- func (m *BytesMessage) MarshalVT() (dAtA []byte, err error)
- func (*BytesMessage) ProtoMessage()
- func (x *BytesMessage) ProtoReflect() protoreflect.Message
- func (x *BytesMessage) Reset()
- func (m *BytesMessage) SizeVT() (n int)
- func (x *BytesMessage) String() string
- func (m *BytesMessage) UnmarshalVT(dAtA []byte) error
- type CheckAgentRequest
- func (m *CheckAgentRequest) CloneMessageVT() proto.Message
- func (m *CheckAgentRequest) CloneVT() *CheckAgentRequest
- func (*CheckAgentRequest) Descriptor() ([]byte, []int)
- func (this *CheckAgentRequest) EqualMessageVT(thatMsg proto.Message) bool
- func (this *CheckAgentRequest) EqualVT(that *CheckAgentRequest) bool
- func (x *CheckAgentRequest) GetID() string
- func (m *CheckAgentRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *CheckAgentRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *CheckAgentRequest) MarshalVT() (dAtA []byte, err error)
- func (*CheckAgentRequest) ProtoMessage()
- func (x *CheckAgentRequest) ProtoReflect() protoreflect.Message
- func (x *CheckAgentRequest) Reset()
- func (m *CheckAgentRequest) SizeVT() (n int)
- func (x *CheckAgentRequest) String() string
- func (m *CheckAgentRequest) UnmarshalVT(dAtA []byte) error
- type CheckAgentResponse
- func (m *CheckAgentResponse) CloneMessageVT() proto.Message
- func (m *CheckAgentResponse) CloneVT() *CheckAgentResponse
- func (*CheckAgentResponse) Descriptor() ([]byte, []int)
- func (this *CheckAgentResponse) EqualMessageVT(thatMsg proto.Message) bool
- func (this *CheckAgentResponse) EqualVT(that *CheckAgentResponse) bool
- func (m *CheckAgentResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *CheckAgentResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *CheckAgentResponse) MarshalVT() (dAtA []byte, err error)
- func (*CheckAgentResponse) ProtoMessage()
- func (x *CheckAgentResponse) ProtoReflect() protoreflect.Message
- func (x *CheckAgentResponse) Reset()
- func (m *CheckAgentResponse) SizeVT() (n int)
- func (x *CheckAgentResponse) String() string
- func (m *CheckAgentResponse) UnmarshalVT(dAtA []byte) error
- type SSHClient
- type SSHServer
- type SSH_ForwardAgentClient
- type SSH_ForwardAgentServer
- type SocketOpt
- type Stream
- type UnimplementedSSHServer
- func (UnimplementedSSHServer) CheckAgent(context.Context, *CheckAgentRequest) (*CheckAgentResponse, error)
- func (UnimplementedSSHServer) ForwardAgent(grpc.BidiStreamingServer[BytesMessage, BytesMessage]) error
- type UnsafeSSHServer
Constants ¶
const ( SSH_CheckAgent_FullMethodName = "/moby.sshforward.v1.SSH/CheckAgent" SSH_ForwardAgent_FullMethodName = "/moby.sshforward.v1.SSH/ForwardAgent" )
const DefaultID = "default"
DefaultID is the default ssh ID
const KeySSHID = "buildkit.ssh.id"
Variables ¶
var File_github_com_moby_buildkit_session_sshforward_ssh_proto protoreflect.FileDescriptor
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 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 ¶
func (m *BytesMessage) CloneMessageVT() proto.Message
func (*BytesMessage) CloneVT ¶
func (m *BytesMessage) CloneVT() *BytesMessage
func (*BytesMessage) Descriptor ¶
func (*BytesMessage) Descriptor() ([]byte, []int)
Deprecated: Use BytesMessage.ProtoReflect.Descriptor instead.
func (*BytesMessage) EqualMessageVT ¶
func (this *BytesMessage) EqualMessageVT(thatMsg proto.Message) bool
func (*BytesMessage) EqualVT ¶
func (this *BytesMessage) EqualVT(that *BytesMessage) bool
func (*BytesMessage) GetData ¶
func (x *BytesMessage) GetData() []byte
func (*BytesMessage) MarshalToSizedBufferVT ¶
func (m *BytesMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*BytesMessage) MarshalToVT ¶
func (m *BytesMessage) MarshalToVT(dAtA []byte) (int, error)
func (*BytesMessage) MarshalVT ¶
func (m *BytesMessage) MarshalVT() (dAtA []byte, err error)
func (*BytesMessage) ProtoMessage ¶
func (*BytesMessage) ProtoMessage()
func (*BytesMessage) ProtoReflect ¶
func (x *BytesMessage) ProtoReflect() protoreflect.Message
func (*BytesMessage) Reset ¶
func (x *BytesMessage) Reset()
func (*BytesMessage) SizeVT ¶
func (m *BytesMessage) SizeVT() (n int)
func (*BytesMessage) String ¶
func (x *BytesMessage) String() string
func (*BytesMessage) UnmarshalVT ¶
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 ¶
func (m *CheckAgentRequest) CloneMessageVT() proto.Message
func (*CheckAgentRequest) CloneVT ¶
func (m *CheckAgentRequest) CloneVT() *CheckAgentRequest
func (*CheckAgentRequest) Descriptor ¶
func (*CheckAgentRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckAgentRequest.ProtoReflect.Descriptor instead.
func (*CheckAgentRequest) EqualMessageVT ¶
func (this *CheckAgentRequest) EqualMessageVT(thatMsg proto.Message) bool
func (*CheckAgentRequest) EqualVT ¶
func (this *CheckAgentRequest) EqualVT(that *CheckAgentRequest) bool
func (*CheckAgentRequest) GetID ¶
func (x *CheckAgentRequest) GetID() string
func (*CheckAgentRequest) MarshalToSizedBufferVT ¶
func (m *CheckAgentRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*CheckAgentRequest) MarshalToVT ¶
func (m *CheckAgentRequest) MarshalToVT(dAtA []byte) (int, error)
func (*CheckAgentRequest) MarshalVT ¶
func (m *CheckAgentRequest) MarshalVT() (dAtA []byte, err error)
func (*CheckAgentRequest) ProtoMessage ¶
func (*CheckAgentRequest) ProtoMessage()
func (*CheckAgentRequest) ProtoReflect ¶
func (x *CheckAgentRequest) ProtoReflect() protoreflect.Message
func (*CheckAgentRequest) Reset ¶
func (x *CheckAgentRequest) Reset()
func (*CheckAgentRequest) SizeVT ¶
func (m *CheckAgentRequest) SizeVT() (n int)
func (*CheckAgentRequest) String ¶
func (x *CheckAgentRequest) String() string
func (*CheckAgentRequest) UnmarshalVT ¶
func (m *CheckAgentRequest) UnmarshalVT(dAtA []byte) error
type CheckAgentResponse ¶
type CheckAgentResponse struct {
// contains filtered or unexported fields
}
func (*CheckAgentResponse) CloneMessageVT ¶
func (m *CheckAgentResponse) CloneMessageVT() proto.Message
func (*CheckAgentResponse) CloneVT ¶
func (m *CheckAgentResponse) CloneVT() *CheckAgentResponse
func (*CheckAgentResponse) Descriptor ¶
func (*CheckAgentResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckAgentResponse.ProtoReflect.Descriptor instead.
func (*CheckAgentResponse) EqualMessageVT ¶
func (this *CheckAgentResponse) EqualMessageVT(thatMsg proto.Message) bool
func (*CheckAgentResponse) EqualVT ¶
func (this *CheckAgentResponse) EqualVT(that *CheckAgentResponse) bool
func (*CheckAgentResponse) MarshalToSizedBufferVT ¶
func (m *CheckAgentResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*CheckAgentResponse) MarshalToVT ¶
func (m *CheckAgentResponse) MarshalToVT(dAtA []byte) (int, error)
func (*CheckAgentResponse) MarshalVT ¶
func (m *CheckAgentResponse) MarshalVT() (dAtA []byte, err error)
func (*CheckAgentResponse) ProtoMessage ¶
func (*CheckAgentResponse) ProtoMessage()
func (*CheckAgentResponse) ProtoReflect ¶
func (x *CheckAgentResponse) ProtoReflect() protoreflect.Message
func (*CheckAgentResponse) Reset ¶
func (x *CheckAgentResponse) Reset()
func (*CheckAgentResponse) SizeVT ¶
func (m *CheckAgentResponse) SizeVT() (n int)
func (*CheckAgentResponse) String ¶
func (x *CheckAgentResponse) String() string
func (*CheckAgentResponse) UnmarshalVT ¶
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 Stream ¶
type UnimplementedSSHServer ¶
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 ¶
func (UnimplementedSSHServer) CheckAgent(context.Context, *CheckAgentRequest) (*CheckAgentResponse, error)
func (UnimplementedSSHServer) ForwardAgent ¶
func (UnimplementedSSHServer) ForwardAgent(grpc.BidiStreamingServer[BytesMessage, BytesMessage]) error
type UnsafeSSHServer ¶
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.
Source Files ¶
copy.go ssh.go ssh.pb.go ssh_grpc.pb.go ssh_vtproto.pb.go
Directories ¶
Path | Synopsis |
---|---|
session/sshforward/sshprovider |
- Version
- v0.21.0 (latest)
- Published
- Apr 11, 2025
- Platform
- linux/amd64
- Imports
- 19 packages
- Last checked
- 9 minutes ago –
Tools for package owners.