Documentation
¶
Index ¶
- func NewAgentTransport(signatureService portainer.DigitalSignatureService, tlsConfig *tls.Config, ...) *agentTransport
- func NewEdgeTransport(dataStore dataservices.DataStore, ...) *edgeTransport
- func NewLocalTransport(tokenManager *tokenManager, endpoint *portainer.Endpoint, ...) (*localTransport, error)
- func NewTokenManager(kubecli portainer.KubeClient, dataStore dataservices.DataStore, ...) (*tokenManager, error)
- type TokenCacheManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAgentTransport ¶
func NewAgentTransport(signatureService portainer.DigitalSignatureService, tlsConfig *tls.Config, tokenManager *tokenManager, endpoint *portainer.Endpoint, k8sClientFactory *cli.ClientFactory, dataStore dataservices.DataStore) *agentTransport
NewAgentTransport returns a new transport that can be used to send signed requests to a Portainer agent
func NewEdgeTransport ¶
func NewEdgeTransport(dataStore dataservices.DataStore, signatureService portainer.DigitalSignatureService, reverseTunnelService portainer.ReverseTunnelService, endpoint *portainer.Endpoint, tokenManager *tokenManager, k8sClientFactory *cli.ClientFactory) *edgeTransport
NewAgentTransport returns a new transport that can be used to send signed requests to a Portainer Edge agent
func NewLocalTransport ¶
func NewLocalTransport(tokenManager *tokenManager, endpoint *portainer.Endpoint, k8sClientFactory *cli.ClientFactory, dataStore dataservices.DataStore) (*localTransport, error)
NewLocalTransport returns a new transport that can be used to send requests to the local Kubernetes API
func NewTokenManager ¶
func NewTokenManager(kubecli portainer.KubeClient, dataStore dataservices.DataStore, cache *tokenCache, setLocalAdminToken bool) (*tokenManager, error)
NewTokenManager returns a pointer to a new instance of tokenManager. If the useLocalAdminToken parameter is set to true, it will search for the local admin service account and associate it to the manager.
Types ¶
type TokenCacheManager ¶
type TokenCacheManager struct {
// contains filtered or unexported fields
}
TokenCacheManager represents a service used to manage multiple tokenCache objects.
func NewTokenCacheManager ¶
func NewTokenCacheManager() *TokenCacheManager
NewTokenCacheManager returns a pointer to a new instance of TokenCacheManager
func (*TokenCacheManager) GetOrCreateTokenCache ¶
func (manager *TokenCacheManager) GetOrCreateTokenCache(endpointID portainer.EndpointID) *tokenCache
GetOrCreateTokenCache will get the tokenCache from the manager map of caches if it exists, otherwise it will create a new tokenCache object, associate it to the manager map of caches and return a pointer to that tokenCache instance.
func (*TokenCacheManager) RemoveUserFromCache ¶
func (manager *TokenCacheManager) RemoveUserFromCache(userID portainer.UserID)
RemoveUserFromCache will ensure that the specific userID is removed from all registered caches.