sshforward

package
v0.11.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 19 Imported by: 28

Documentation

Index

Constants

View Source
const DefaultID = "default"

DefaultID is the default ssh ID

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

Variables

View Source
var (
	ErrInvalidLengthSsh        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSsh          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSsh = fmt.Errorf("proto: unexpected end of group")
)

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.Server, srv SSHServer)

Types

type BytesMessage

type BytesMessage struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}

BytesMessage contains a chunk of byte data

func (*BytesMessage) Descriptor

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

func (*BytesMessage) Equal

func (this *BytesMessage) Equal(that interface{}) bool

func (*BytesMessage) GetData

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

func (*BytesMessage) GoString

func (this *BytesMessage) GoString() string

func (*BytesMessage) Marshal

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

func (*BytesMessage) MarshalTo

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

func (*BytesMessage) MarshalToSizedBuffer added in v0.7.0

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

func (*BytesMessage) ProtoMessage

func (*BytesMessage) ProtoMessage()

func (*BytesMessage) Reset

func (m *BytesMessage) Reset()

func (*BytesMessage) Size

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

func (*BytesMessage) String

func (this *BytesMessage) String() string

func (*BytesMessage) Unmarshal

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

func (*BytesMessage) XXX_DiscardUnknown added in v0.4.0

func (m *BytesMessage) XXX_DiscardUnknown()

func (*BytesMessage) XXX_Marshal added in v0.4.0

func (m *BytesMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BytesMessage) XXX_Merge added in v0.4.0

func (m *BytesMessage) XXX_Merge(src proto.Message)

func (*BytesMessage) XXX_Size added in v0.4.0

func (m *BytesMessage) XXX_Size() int

func (*BytesMessage) XXX_Unmarshal added in v0.4.0

func (m *BytesMessage) XXX_Unmarshal(b []byte) error

type CheckAgentRequest

type CheckAgentRequest struct {
	ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
}

func (*CheckAgentRequest) Descriptor

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

func (*CheckAgentRequest) Equal

func (this *CheckAgentRequest) Equal(that interface{}) bool

func (*CheckAgentRequest) GetID

func (m *CheckAgentRequest) GetID() string

func (*CheckAgentRequest) GoString

func (this *CheckAgentRequest) GoString() string

func (*CheckAgentRequest) Marshal

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

func (*CheckAgentRequest) MarshalTo

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

func (*CheckAgentRequest) MarshalToSizedBuffer added in v0.7.0

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

func (*CheckAgentRequest) ProtoMessage

func (*CheckAgentRequest) ProtoMessage()

func (*CheckAgentRequest) Reset

func (m *CheckAgentRequest) Reset()

func (*CheckAgentRequest) Size

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

func (*CheckAgentRequest) String

func (this *CheckAgentRequest) String() string

func (*CheckAgentRequest) Unmarshal

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

func (*CheckAgentRequest) XXX_DiscardUnknown added in v0.4.0

func (m *CheckAgentRequest) XXX_DiscardUnknown()

func (*CheckAgentRequest) XXX_Marshal added in v0.4.0

func (m *CheckAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckAgentRequest) XXX_Merge added in v0.4.0

func (m *CheckAgentRequest) XXX_Merge(src proto.Message)

func (*CheckAgentRequest) XXX_Size added in v0.4.0

func (m *CheckAgentRequest) XXX_Size() int

func (*CheckAgentRequest) XXX_Unmarshal added in v0.4.0

func (m *CheckAgentRequest) XXX_Unmarshal(b []byte) error

type CheckAgentResponse

type CheckAgentResponse struct {
}

func (*CheckAgentResponse) Descriptor

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

func (*CheckAgentResponse) Equal

func (this *CheckAgentResponse) Equal(that interface{}) bool

func (*CheckAgentResponse) GoString

func (this *CheckAgentResponse) GoString() string

func (*CheckAgentResponse) Marshal

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

func (*CheckAgentResponse) MarshalTo

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

func (*CheckAgentResponse) MarshalToSizedBuffer added in v0.7.0

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

func (*CheckAgentResponse) ProtoMessage

func (*CheckAgentResponse) ProtoMessage()

func (*CheckAgentResponse) Reset

func (m *CheckAgentResponse) Reset()

func (*CheckAgentResponse) Size

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

func (*CheckAgentResponse) String

func (this *CheckAgentResponse) String() string

func (*CheckAgentResponse) Unmarshal

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

func (*CheckAgentResponse) XXX_DiscardUnknown added in v0.4.0

func (m *CheckAgentResponse) XXX_DiscardUnknown()

func (*CheckAgentResponse) XXX_Marshal added in v0.4.0

func (m *CheckAgentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckAgentResponse) XXX_Merge added in v0.4.0

func (m *CheckAgentResponse) XXX_Merge(src proto.Message)

func (*CheckAgentResponse) XXX_Size added in v0.4.0

func (m *CheckAgentResponse) XXX_Size() int

func (*CheckAgentResponse) XXX_Unmarshal added in v0.4.0

func (m *CheckAgentResponse) XXX_Unmarshal(b []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) (SSH_ForwardAgentClient, error)
}

SSHClient is the client API for SSH service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSSHClient

func NewSSHClient(cc *grpc.ClientConn) SSHClient

type SSHServer

type SSHServer interface {
	CheckAgent(context.Context, *CheckAgentRequest) (*CheckAgentResponse, error)
	ForwardAgent(SSH_ForwardAgentServer) error
}

SSHServer is the server API for SSH service.

type SSH_ForwardAgentClient

type SSH_ForwardAgentClient interface {
	Send(*BytesMessage) error
	Recv() (*BytesMessage, error)
	grpc.ClientStream
}

type SSH_ForwardAgentServer

type SSH_ForwardAgentServer interface {
	Send(*BytesMessage) error
	Recv() (*BytesMessage, error)
	grpc.ServerStream
}

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 can be embedded to have forward compatible implementations.

func (*UnimplementedSSHServer) CheckAgent added in v0.7.0

func (*UnimplementedSSHServer) ForwardAgent added in v0.7.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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