userd

package
v2.7.6-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0 Imports: 57 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 Notify

func Notify(c context.Context, message string)

Notify displays a desktop banner notification to the user

Types

type CommandFactory

type CommandFactory func(context.Context) 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 Service added in v2.7.0

type Service struct {
	rpc.UnsafeConnectorServer

	ManagerProxy trafficmgr.ManagerProxy
	// contains filtered or unexported fields
}

Service represents the long-running state of the Telepresence User Daemon

func GetPoddService added in v2.7.0

func GetPoddService(sc *scout.Reporter, cfg client.Config, login auth.LoginExecutor) Service

func (*Service) AddInterceptor added in v2.7.0

func (s *Service) AddInterceptor(ctx context.Context, interceptor *rpc.Interceptor) (*empty.Empty, error)

func (*Service) CanIntercept added in v2.7.0

func (s *Service) CanIntercept(c context.Context, ir *rpc.CreateInterceptRequest) (result *rpc.InterceptResult, err error)

func (*Service) Connect added in v2.7.0

func (s *Service) Connect(ctx context.Context, cr *rpc.ConnectRequest) (result *rpc.ConnectInfo, err error)

func (*Service) CreateIntercept added in v2.7.0

func (s *Service) CreateIntercept(c context.Context, ir *rpc.CreateInterceptRequest) (result *rpc.InterceptResult, err error)

func (*Service) Disconnect added in v2.7.0

func (s *Service) Disconnect(c context.Context, _ *empty.Empty) (*empty.Empty, error)

func (*Service) FuseFTPError added in v2.8.0

func (s *Service) FuseFTPError() error

func (*Service) GatherLogs added in v2.7.0

func (s *Service) GatherLogs(ctx context.Context, request *rpc.LogsRequest) (result *rpc.LogsResponse, err error)

func (*Service) GetCloudAPIKey added in v2.7.0

func (s *Service) GetCloudAPIKey(ctx context.Context, req *rpc.KeyRequest) (result *rpc.KeyData, err error)

func (*Service) GetCloudLicense added in v2.7.0

func (s *Service) GetCloudLicense(ctx context.Context, req *rpc.LicenseRequest) (result *rpc.LicenseData, err error)

func (*Service) GetCloudUserInfo added in v2.7.0

func (s *Service) GetCloudUserInfo(ctx context.Context, req *rpc.UserInfoRequest) (result *rpc.UserInfo, err error)

func (*Service) GetIngressInfos added in v2.7.0

func (s *Service) GetIngressInfos(c context.Context, _ *empty.Empty) (result *rpc.IngressInfos, err error)

func (*Service) GetNamespaces added in v2.7.2

func (*Service) Helm added in v2.7.1

func (s *Service) Helm(ctx context.Context, req *rpc.HelmRequest) (*rpc.Result, error)

func (*Service) List added in v2.7.0

func (s *Service) List(c context.Context, lr *rpc.ListRequest) (result *rpc.WorkloadInfoSnapshot, err error)

func (*Service) ListCommands added in v2.7.0

func (s *Service) ListCommands(ctx context.Context, _ *empty.Empty) (groups *rpc.CommandGroups, err error)

func (*Service) Login added in v2.7.0

func (s *Service) Login(ctx context.Context, req *rpc.LoginRequest) (result *rpc.LoginResult, err error)

func (*Service) LoginExecutor added in v2.7.0

func (s *Service) LoginExecutor() auth.LoginExecutor

func (*Service) Logout added in v2.7.0

func (s *Service) Logout(ctx context.Context, _ *empty.Empty) (result *empty.Empty, err error)

func (*Service) ManageSessions added in v2.7.0

func (s *Service) ManageSessions(c context.Context, sessionServices []trafficmgr.SessionService, fuseFtp rpc2.FuseFTPClient) error

ManageSessions is the counterpart to the Connect method. It reads the connectCh, creates a session and writes a reply to the connectErrCh. The session is then started if it was successfully created.

func (*Service) Quit added in v2.7.0

func (s *Service) Quit(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)

func (*Service) RemoveIntercept added in v2.7.0

func (s *Service) RemoveIntercept(c context.Context, rr *manager.RemoveInterceptRequest2) (result *rpc.InterceptResult, err error)

func (*Service) RemoveInterceptor added in v2.7.0

func (s *Service) RemoveInterceptor(ctx context.Context, interceptor *rpc.Interceptor) (*empty.Empty, error)

func (*Service) ResolveIngressInfo added in v2.7.0

func (s *Service) ResolveIngressInfo(ctx context.Context, req *userdaemon.IngressInfoRequest) (resp *userdaemon.IngressInfoResponse, err error)

func (*Service) RootDaemonClient added in v2.7.0

func (s *Service) RootDaemonClient(c context.Context) (daemon.DaemonClient, error)

func (*Service) RunCommand added in v2.7.0

func (s *Service) RunCommand(cmdStream rpc.Connector_RunCommandServer) (err error)

func (*Service) SetLogLevel added in v2.7.0

func (s *Service) SetLogLevel(ctx context.Context, request *manager.LogLevelRequest) (result *empty.Empty, err error)

func (*Service) SetManagerClient added in v2.7.0

func (s *Service) SetManagerClient(managerClient manager.ManagerClient, callOptions ...grpc.CallOption)

func (*Service) Status added in v2.7.0

func (s *Service) Status(c context.Context, _ *empty.Empty) (result *rpc.ConnectInfo, err error)

func (*Service) Uninstall added in v2.7.0

func (s *Service) Uninstall(c context.Context, ur *rpc.UninstallRequest) (result *rpc.Result, err error)

func (*Service) UserNotifications added in v2.7.0

func (s *Service) UserNotifications(_ *empty.Empty, stream rpc.Connector_UserNotificationsServer) (err error)

func (*Service) ValidArgsForCommand added in v2.7.2

func (*Service) Version added in v2.7.0

func (s *Service) Version(_ context.Context, _ *empty.Empty) (*common.VersionInfo, error)

func (*Service) WatchWorkloads added in v2.7.0

type SessionClient added in v2.6.0

func (*SessionClient) Close added in v2.6.0

func (c *SessionClient) Close(ctx context.Context) error

type SessionClientProvider added in v2.6.0

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

func (*SessionClientProvider) BuildClient added in v2.6.0

func (p *SessionClientProvider) BuildClient(ctx context.Context, conn *grpc.ClientConn) (*SessionClient, error)

func (*SessionClientProvider) GetAPIKey added in v2.6.0

func (p *SessionClientProvider) GetAPIKey(ctx context.Context) (string, error)

func (*SessionClientProvider) GetCloudConfig added in v2.6.5

func (*SessionClientProvider) GetExtraHeaders added in v2.6.0

func (p *SessionClientProvider) GetExtraHeaders(ctx context.Context) (map[string]string, error)

func (*SessionClientProvider) GetInstallID added in v2.6.0

func (p *SessionClientProvider) GetInstallID(ctx context.Context) (string, error)

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