Documentation ¶
Index ¶
- Constants
- func RunSession(c context.Context, s Session) error
- func WithNewServiceFunc(ctx context.Context, f NewServiceFunc) context.Context
- func WithNewSessionFunc(ctx context.Context, f NewSessionFunc) context.Context
- func WithService(ctx context.Context, s Service) context.Context
- type InterceptInfo
- type KubeConfig
- type NamespaceListener
- type NewServiceFunc
- type NewSessionFunc
- type Service
- type Session
- type WatchWorkloadsStream
Constants ¶
View Source
const ProcessName = "connector"
Variables ¶
This section is empty.
Functions ¶
func RunSession ¶ added in v2.9.0
RunSession (1) starts up with ensuring that the manager is installed and running, but then for most of its life
- (2) calls manager.ArriveAsClient and then periodically calls manager.Remain
- run the intercepts (manager.WatchIntercepts) and then
- (3) listen on the appropriate local ports and forward them to the intercepted Services, and
- (4) mount the appropriate remote volumes.
func WithNewServiceFunc ¶ added in v2.9.0
func WithNewServiceFunc(ctx context.Context, f NewServiceFunc) context.Context
func WithNewSessionFunc ¶ added in v2.9.0
func WithNewSessionFunc(ctx context.Context, f NewSessionFunc) context.Context
Types ¶
type InterceptInfo ¶ added in v2.9.0
type InterceptInfo interface { APIKey() string InterceptResult() *rpc.InterceptResult PreparedIntercept() *manager.PreparedIntercept PortIdentifier() (agentconfig.PortIdentifier, error) }
type KubeConfig ¶ added in v2.9.0
type NamespaceListener ¶ added in v2.9.0
type NewServiceFunc ¶ added in v2.9.0
type NewServiceFunc func(context.Context, *dgroup.Group, *scout.Reporter, *client.Config, *grpc.Server) (Service, error)
func GetNewServiceFunc ¶ added in v2.9.0
func GetNewServiceFunc(ctx context.Context) NewServiceFunc
type NewSessionFunc ¶ added in v2.9.0
type NewSessionFunc func(context.Context, *scout.Reporter, *rpc.ConnectRequest) (context.Context, Session, *connector.ConnectInfo)
func GetNewSessionFunc ¶ added in v2.9.0
func GetNewSessionFunc(ctx context.Context) NewSessionFunc
type Service ¶ added in v2.7.0
type Service interface { // As will cast this instance to what the given ptr points to, and assign // that to the pointer. It will panic if type is not implemented. As(ptr any) Reporter() *scout.Reporter Server() *grpc.Server // GetAPIKey returns the current API key GetAPIKey(context.Context) (string, error) GetFuseFTPClient(ctx context.Context) rpc.FuseFTPClient }
A Service is one that runs during the entire lifecycle of the daemon. This should be used to augment the daemon with GRPC services.
func GetService ¶ added in v2.9.4
type Session ¶ added in v2.9.0
type Session interface { restapi.AgentState KubeConfig // As will cast this instance to what the given ptr points to, and assign // that to the pointer. It will panic if type is not implemented. As(ptr any) InterceptProlog(context.Context, *manager.CreateInterceptRequest) *rpc.InterceptResult InterceptEpilog(context.Context, *rpc.CreateInterceptRequest, *rpc.InterceptResult) *rpc.InterceptResult RemoveIntercept(context.Context, string) error AddInterceptor(string, int) error RemoveInterceptor(string) error ClearIntercepts(context.Context) error GetInterceptInfo(string) *manager.InterceptInfo GetInterceptSpec(string) *manager.InterceptSpec InterceptsForWorkload(string, string) []*manager.InterceptSpec ManagerClient() manager.ManagerClient ManagerConn() *grpc.ClientConn ManagerVersion() semver.Version Status(context.Context) *rpc.ConnectInfo UpdateStatus(context.Context, *rpc.ConnectRequest) *rpc.ConnectInfo Uninstall(context.Context, *rpc.UninstallRequest) (*rpc.Result, error) WatchWorkloads(context.Context, *rpc.WatchWorkloadsRequest, WatchWorkloadsStream) error WorkloadInfoSnapshot(context.Context, []string, rpc.ListRequest_Filter, bool) (*rpc.WorkloadInfoSnapshot, error) GetCurrentNamespaces(forClientAccess bool) []string ActualNamespace(string) string AddNamespaceListener(context.Context, NamespaceListener) WithK8sInterface(context.Context) context.Context ForeachAgentPod(ctx context.Context, fn func(context.Context, typed.PodInterface, *core.Pod), filter func(*core.Pod) bool) error GatherLogs(context.Context, *connector.LogsRequest) (*connector.LogsResponse, error) GatherTraces(ctx context.Context, tr *connector.TracesRequest) *connector.Result Reporter() *scout.Reporter SessionInfo() *manager.SessionInfo ApplyConfig(context.Context) error GetConfig(context.Context) (*client.SessionConfig, error) StartServices(g *dgroup.Group) Epilog(ctx context.Context) Done() <-chan struct{} }
type WatchWorkloadsStream ¶ added in v2.9.0
type WatchWorkloadsStream interface {
Send(*rpc.WorkloadInfoSnapshot) error
}
Click to show internal directories.
Click to hide internal directories.