Documentation
¶
Overview ¶
Package access asks the access virtual workspace which workspaces a caller can see.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client resolves a caller's workspaces from the access virtual workspace.
Results are cached per identity for CacheTTL, because a single MCP session makes many tool calls and each one needs the same list. The cache is the reason an HTTP hop is acceptable here at all.
func New ¶
New returns a Client. It does not contact the access virtual workspace; failures surface on the first Workspaces call.
func (*Client) Invalidate ¶
Invalidate drops any cached answer for u.
type Options ¶
type Options struct {
// BaseURL is the access virtual workspace's address, up to and including
// its /services/access prefix.
BaseURL string
// CAFile verifies the access VW's serving certificate. Empty uses the
// system pool.
CAFile string
// Impersonator is this server's own credential. SelfClusterAccessReview
// answers for whoever the request authenticates as, so asking on a caller's
// behalf means impersonating them.
Impersonator *rest.Config
// CacheTTL bounds how long an answer is reused per caller.
CacheTTL time.Duration
}
Options configures a Client.
Click to show internal directories.
Click to hide internal directories.