Documentation ¶
Index ¶
- Constants
- func Command(getCommands CommandFactory, daemonServices []DaemonService, ...) *cobra.Command
- func Notify(c context.Context, message string)
- type CommandFactory
- type DaemonService
- type Service
- func (s *Service) AddInterceptor(ctx context.Context, interceptor *rpc.Interceptor) (*empty.Empty, error)
- func (s *Service) CanIntercept(c context.Context, ir *rpc.CreateInterceptRequest) (result *rpc.InterceptResult, err error)
- func (s *Service) Connect(ctx context.Context, cr *rpc.ConnectRequest) (result *rpc.ConnectInfo, err error)
- func (s *Service) CreateIntercept(c context.Context, ir *rpc.CreateInterceptRequest) (result *rpc.InterceptResult, err error)
- func (s *Service) Disconnect(c context.Context, _ *empty.Empty) (*empty.Empty, error)
- func (s *Service) FuseFTPError() error
- func (s *Service) GatherLogs(ctx context.Context, request *rpc.LogsRequest) (result *rpc.LogsResponse, err error)
- func (s *Service) GetCloudAPIKey(ctx context.Context, req *rpc.KeyRequest) (result *rpc.KeyData, err error)
- func (s *Service) GetCloudLicense(ctx context.Context, req *rpc.LicenseRequest) (result *rpc.LicenseData, err error)
- func (s *Service) GetCloudUserInfo(ctx context.Context, req *rpc.UserInfoRequest) (result *rpc.UserInfo, err error)
- func (s *Service) GetIngressInfos(c context.Context, _ *empty.Empty) (result *rpc.IngressInfos, err error)
- func (s *Service) GetNamespaces(ctx context.Context, req *rpc.GetNamespacesRequest) (*rpc.GetNamespacesResponse, error)
- func (s *Service) Helm(ctx context.Context, req *rpc.HelmRequest) (*rpc.Result, error)
- func (s *Service) List(c context.Context, lr *rpc.ListRequest) (result *rpc.WorkloadInfoSnapshot, err error)
- func (s *Service) ListCommands(ctx context.Context, _ *empty.Empty) (groups *rpc.CommandGroups, err error)
- func (s *Service) Login(ctx context.Context, req *rpc.LoginRequest) (result *rpc.LoginResult, err error)
- func (s *Service) LoginExecutor() auth.LoginExecutor
- func (s *Service) Logout(ctx context.Context, _ *empty.Empty) (result *empty.Empty, err error)
- func (s *Service) ManageSessions(c context.Context, sessionServices []trafficmgr.SessionService, ...) error
- func (s *Service) Quit(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)
- func (s *Service) RemoveIntercept(c context.Context, rr *manager.RemoveInterceptRequest2) (result *rpc.InterceptResult, err error)
- func (s *Service) RemoveInterceptor(ctx context.Context, interceptor *rpc.Interceptor) (*empty.Empty, error)
- func (s *Service) ResolveIngressInfo(ctx context.Context, req *userdaemon.IngressInfoRequest) (resp *userdaemon.IngressInfoResponse, err error)
- func (s *Service) RootDaemonClient(c context.Context) (daemon.DaemonClient, error)
- func (s *Service) RunCommand(cmdStream rpc.Connector_RunCommandServer) (err error)
- func (s *Service) SetLogLevel(ctx context.Context, request *manager.LogLevelRequest) (result *empty.Empty, err error)
- func (s *Service) SetManagerClient(managerClient manager.ManagerClient, callOptions ...grpc.CallOption)
- func (s *Service) Status(c context.Context, _ *empty.Empty) (result *rpc.ConnectInfo, err error)
- func (s *Service) Uninstall(c context.Context, ur *rpc.UninstallRequest) (result *rpc.Result, err error)
- func (s *Service) UserNotifications(_ *empty.Empty, stream rpc.Connector_UserNotificationsServer) (err error)
- func (s *Service) ValidArgsForCommand(ctx context.Context, req *rpc.ValidArgsForCommandRequest) (*rpc.ValidArgsForCommandResponse, error)
- func (s *Service) Version(_ context.Context, _ *empty.Empty) (*common.VersionInfo, error)
- func (s *Service) WatchWorkloads(wr *rpc.WatchWorkloadsRequest, server rpc.Connector_WatchWorkloadsServer) error
- type SessionClient
- type SessionClientProvider
- func (p *SessionClientProvider) BuildClient(ctx context.Context, conn *grpc.ClientConn) (*SessionClient, error)
- func (p *SessionClientProvider) GetAPIKey(ctx context.Context) (string, error)
- func (p *SessionClientProvider) GetCloudConfig(ctx context.Context) (*manager.AmbassadorCloudConfig, error)
- func (p *SessionClientProvider) GetExtraHeaders(ctx context.Context) (map[string]string, error)
- func (p *SessionClientProvider) GetInstallID(ctx context.Context) (string, error)
- type WithSession
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"
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 (*Service) AddInterceptor ¶ added in v2.7.0
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 (*Service) FuseFTPError ¶ added in v2.8.0
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 (*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 (*Service) GetIngressInfos ¶ added in v2.7.0
func (*Service) GetNamespaces ¶ added in v2.7.2
func (s *Service) GetNamespaces(ctx context.Context, req *rpc.GetNamespacesRequest) (*rpc.GetNamespacesResponse, 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 (*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) 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) 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 (*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 (*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 (*Service) SetManagerClient ¶ added in v2.7.0
func (s *Service) SetManagerClient(managerClient manager.ManagerClient, callOptions ...grpc.CallOption)
func (*Service) UserNotifications ¶ added in v2.7.0
func (*Service) ValidArgsForCommand ¶ added in v2.7.2
func (s *Service) ValidArgsForCommand(ctx context.Context, req *rpc.ValidArgsForCommandRequest) (*rpc.ValidArgsForCommandResponse, error)
func (*Service) WatchWorkloads ¶ added in v2.7.0
func (s *Service) WatchWorkloads(wr *rpc.WatchWorkloadsRequest, server rpc.Connector_WatchWorkloadsServer) error
type SessionClient ¶ added in v2.6.0
type SessionClient struct { userdaemon.SystemAClient systema.UserDaemonSystemAProxyClient }
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 (p *SessionClientProvider) GetCloudConfig(ctx context.Context) (*manager.AmbassadorCloudConfig, error)
func (*SessionClientProvider) GetExtraHeaders ¶ added in v2.6.0
func (*SessionClientProvider) GetInstallID ¶ added in v2.6.0
func (p *SessionClientProvider) GetInstallID(ctx context.Context) (string, error)
Click to show internal directories.
Click to hide internal directories.