userd

package
v2.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const ProcessName = "connector"

Variables

This section is empty.

Functions

func Command

func Command(getCommands CommandFactory, daemonServices []DaemonService, sessionServices []trafficmgr.SessionService) *cobra.Command

Command returns the CLI sub-command for "connector-foreground"

func ConnectSessionToSystemA

func ConnectSessionToSystemA(ctx context.Context, session trafficmgr.Session) (*grpc.ClientConn, error)

func ConnectSystemA

func ConnectSystemA(ctx context.Context, systemaURL, apiKey string) (*grpc.ClientConn, error)

ConnectSystemA tries to create a connection to the given systemaURL using the apiKey for authorization and returns the connection if it was successful in creating one

func Notify

func Notify(c context.Context, message string)

Notify displays a desktop banner notification to the user

Types

type CommandFactory

type CommandFactory func() cliutil.CommandGroups

type DaemonService

type DaemonService interface {
	Name() string
	// Start should start the daemon service. It's expected that it returns and does not block. Any long-running tasks should be
	// managed as goroutines started by Start.
	Start(ctx context.Context, scout *scout.Reporter, grpcServer *grpc.Server, withSession WithSession) error
}

A DaemonService is one that runs during the entire lifecycle of the daemon. This should be used to augment the daemon with GRPC services.

type WithSession

type WithSession func(c context.Context, callName string, f func(context.Context, trafficmgr.Session) error) (err error)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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