Documentation ¶
Index ¶
- Constants
- 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
- func WithSession(ctx context.Context, session Session) 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 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 { 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, *client.Kubeconfig) (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 // SetManagerClient will assign the manager client that this Service will use when acting as // a ManagerServer proxy SetManagerClient(manager.ManagerClient, ...grpc.CallOption) // FuseFTPMgr returns the manager responsible for creating a client that can connect to the FuseFTP service. FuseFTPMgr() remotefs.FuseFTPManager RootSessionInProcess() bool WithSession(context.Context, string, func(context.Context, Session) error) error ManageSessions(c context.Context) error }
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 AddIntercept(context.Context, *rpc.CreateInterceptRequest) *rpc.InterceptResult CanIntercept(context.Context, *rpc.CreateInterceptRequest) (InterceptInfo, *rpc.InterceptResult) InterceptProlog(context.Context, *manager.CreateInterceptRequest) *rpc.InterceptResult InterceptEpilog(context.Context, *rpc.CreateInterceptRequest, *rpc.InterceptResult) *rpc.InterceptResult RemoveIntercept(context.Context, string) error NewCreateInterceptRequest(*manager.InterceptSpec) *manager.CreateInterceptRequest AddInterceptor(string, *rpc.Interceptor) 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 ManagerName() string ManagerVersion() semver.Version NewRemainRequest() *manager.RemainRequest Status(context.Context) *rpc.ConnectInfo UpdateStatus(context.Context, *rpc.ConnectRequest) *rpc.ConnectInfo Uninstall(context.Context, *rpc.UninstallRequest) (*common.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) *common.Result Reporter() *scout.Reporter SessionInfo() *manager.SessionInfo RootDaemon() rootdRpc.DaemonClient ApplyConfig(context.Context) error GetConfig(context.Context) (*client.SessionConfig, error) RunSession(c context.Context) error StartServices(g *dgroup.Group) Remain(ctx context.Context) error Epilog(ctx context.Context) Done() <-chan struct{} }
func GetSession ¶ added in v2.11.0
type WatchWorkloadsStream ¶ added in v2.9.0
type WatchWorkloadsStream interface {
Send(*rpc.WorkloadInfoSnapshot) error
}
Click to show internal directories.
Click to hide internal directories.