Documentation ¶
Index ¶
- Variables
- func AddIntercept(sif userd.Session, c context.Context, ir *rpc.CreateInterceptRequest) *rpc.InterceptResult
- func AgentImageFromSystemA(ctx context.Context, v semver.Version) (string, error)
- func CanIntercept(sif userd.Session, c context.Context, ir *rpc.CreateInterceptRequest) (userd.InterceptInfo, *rpc.InterceptResult)
- func CheckTrafficManagerService(ctx context.Context, namespace string) error
- func DeleteSessionInfoFromUserCache(ctx context.Context) error
- func InterceptError(tp common.InterceptError, err error) *rpc.InterceptResult
- func LoadSessionInfoFromUserCache(ctx context.Context, host string) (*manager.SessionInfo, error)
- func NewSession(ctx context.Context, sr *scout.Reporter, cr *rpc.ConnectRequest, ...) (_ context.Context, _ userd.Session, cErr *connector.ConnectInfo)
- func SaveSessionInfoToUserCache(ctx context.Context, host string, session *manager.SessionInfo) error
- type SavedSession
Constants ¶
This section is empty.
Variables ¶
var ErrSessionExpired = errors.New("session expired")
Functions ¶
func AddIntercept ¶ added in v2.9.0
func AddIntercept(sif userd.Session, c context.Context, ir *rpc.CreateInterceptRequest) *rpc.InterceptResult
AddIntercept adds one intercept.
func AgentImageFromSystemA ¶ added in v2.8.0
AgentImageFromSystemA returns the systemA preferred agent Deprecated: not used with traffic-manager versions >= 2.6.0.
func CanIntercept ¶ added in v2.9.0
func CanIntercept(sif userd.Session, c context.Context, ir *rpc.CreateInterceptRequest) (userd.InterceptInfo, *rpc.InterceptResult)
CanIntercept checks if it is possible to create an intercept for the given request. The intercept can proceed only if the returned rpc.InterceptResult is nil. The returned runtime.Object is either nil, indicating a local intercept, or the workload for the intercept.
func CheckTrafficManagerService ¶ added in v2.8.3
func DeleteSessionInfoFromUserCache ¶ added in v2.9.0
DeleteSessionInfoFromUserCache removes SessionInfo cache if existing or returns an error. An attempt to remove a non-existing cache is a no-op and the function returns nil.
func InterceptError ¶ added in v2.9.0
func InterceptError(tp common.InterceptError, err error) *rpc.InterceptResult
func LoadSessionInfoFromUserCache ¶ added in v2.9.0
LoadSessionInfoFromUserCache gets the SessionInfo from cache or returns an error if something goes wrong while loading or unmarshalling.
func NewSession ¶
func NewSession( ctx context.Context, sr *scout.Reporter, cr *rpc.ConnectRequest, config *client.Kubeconfig, ) (_ context.Context, _ userd.Session, cErr *connector.ConnectInfo)
func SaveSessionInfoToUserCache ¶ added in v2.9.0
func SaveSessionInfoToUserCache(ctx context.Context, host string, session *manager.SessionInfo) error
SaveSessionInfoToUserCache saves the provided SessionInfo to user cache and returns an error if something goes wrong while marshalling or persisting.
Types ¶
type SavedSession ¶ added in v2.6.7
type SavedSession struct { Host string Session *manager.SessionInfo `json:"session"` }