Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractTokenAndGetAuthClient ¶
func ExtractTokenAndGetAuthClient(header http.Header) (authorizationv1.AuthorizationV1Interface, error)
ExtractTokenAndGetAuthClient extracts token from http header, and get the authority client of this token
func ExtractTokenAndGetClient ¶
ExtractTokenAndGetClient extracts token from http header, and get the k8s client of this token
func ExtractTokenFromHeader ¶
ExtractTokenFromHeader extracts token from http header
Types ¶
type Clients ¶
type Clients interface { Client(token string) (pkgclient.Client, error) AuthClient(token string) (authorizationv1.AuthorizationV1Interface, error) Num() int Contains(token string) bool }
var K8sClients Clients
K8sClients is an object of Clients
type ClientsPool ¶
Clients is the client pool of k8s client
func (*ClientsPool) AuthClient ¶
func (c *ClientsPool) AuthClient(token string) (authorizationv1.AuthorizationV1Interface, error)
func (*ClientsPool) Client ¶
func (c *ClientsPool) Client(token string) (pkgclient.Client, error)
Client returns a k8s client according to the token
func (*ClientsPool) Contains ¶
func (c *ClientsPool) Contains(token string) bool
Contains return true if have client for the token
type LocalClient ¶
type LocalClient struct {
// contains filtered or unexported fields
}
func (*LocalClient) AuthClient ¶
func (c *LocalClient) AuthClient(token string) (authorizationv1.AuthorizationV1Interface, error)
func (*LocalClient) Client ¶
func (c *LocalClient) Client(token string) (pkgclient.Client, error)
Client returns the local k8s client
func (*LocalClient) Contains ¶
func (c *LocalClient) Contains(token string) bool
Contains return false for LocalClient
Click to show internal directories.
Click to hide internal directories.