node

package
v0.0.0-...-e0d0289 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StopSshServer

func StopSshServer(ctx context.Context, server SshServer) error

Types

type SshServer

type SshServer struct {
	Container testcontainers.Container
}

func StartSshServer

func StartSshServer(ctx context.Context, opts ...SshServerOption) (SshServer, error)

func (*SshServer) CopyFile

func (s *SshServer) CopyFile(ctx context.Context, source, target string) error

func (*SshServer) EtcdPort

func (s *SshServer) EtcdPort(ctx context.Context) (string, error)

func (*SshServer) Exec

func (s *SshServer) Exec(ctx context.Context, command []string) (string, error)

func (*SshServer) Ip

func (s *SshServer) Ip(ctx context.Context) (string, error)

func (*SshServer) ReadFile

func (s *SshServer) ReadFile(ctx context.Context, filePath string) (string, error)

func (*SshServer) SshPort

func (s *SshServer) SshPort(ctx context.Context) (string, error)

type SshServerOption

type SshServerOption func(o *SshServerOptions)

func WithNetwork

func WithNetwork(network string) SshServerOption

func WithSshPassword

func WithSshPassword(password string) SshServerOption

func WithSshPublicKey

func WithSshPublicKey(key string) SshServerOption

func WithSshUsername

func WithSshUsername(username string) SshServerOption

type SshServerOptions

type SshServerOptions struct {
	Networks  []string
	Password  string
	PublicKey string
	Username  string
}

Jump to

Keyboard shortcuts

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