connect

package
v2.20.3-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoUserDaemon = errors.New("telepresence user daemon is not running")
	ErrNoRootDaemon = errors.New("telepresence root daemon is not running")
)
View Source
var QuitDaemonFuncs = []func(context.Context){
	quitHostConnector, quitDockerDaemons,
}

Functions

func CommandInitializer

func CommandInitializer(cmd *cobra.Command) (err error)

func Disconnect

func Disconnect(ctx context.Context)

Disconnect disconnects from a session in the user daemon.

func DiscoverDaemon added in v2.16.0

func DiscoverDaemon(ctx context.Context, match *regexp.Regexp, daemonID *daemon.Identifier) (context.Context, error)

DiscoverDaemon searches the daemon cache for an entry corresponding to the given name. A connection to that daemon is returned if such an entry is found.

func EnsureSession added in v2.16.0

func EnsureSession(ctx context.Context, useLine string, required bool) (context.Context, error)

func EnsureUserDaemon added in v2.16.0

func EnsureUserDaemon(ctx context.Context, required bool) (rc context.Context, err error)

func ExistingDaemon added in v2.18.0

func ExistingDaemon(ctx context.Context, info *daemon.Info) (context.Context, error)

func ExistingHostDaemon added in v2.19.0

func ExistingHostDaemon(ctx context.Context, id *daemon.Identifier) (context.Context, error)

func InitCommand

func InitCommand(cmd *cobra.Command) (err error)

func Initializer added in v2.19.0

func Initializer(ctx context.Context) (context.Context, error)

Initializer ensures that the context is initialized with connection to the user daemon, and that the root daemon is running if necessary.

func Quit added in v2.16.0

func Quit(ctx context.Context)

Quit shuts down all daemons.

func RunConnect

func RunConnect(cmd *cobra.Command, args []string) error

func WithCommandInitializer

func WithCommandInitializer(ctx context.Context, cmdInit func(cmd *cobra.Command) error) context.Context

Types

type ConnectError added in v2.18.0

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

func (*ConnectError) Code added in v2.18.0

func (*ConnectError) Unwrap added in v2.18.0

func (ce *ConnectError) Unwrap() error

Jump to

Keyboard shortcuts

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