gateway

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 56 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(m map[string]interface{}, ss *grpc.Server) (rgrpc.Service, error)

New creates a new gateway svc that acts as a proxy for any grpc operation. The gateway is responsible for high-level controls: rate-limiting, coordination between svcs like sharing and storage acls, asynchronous transactions, ...

Types

type Caches

type Caches []*ttlcache.Cache

Caches holds all caches used by the gateway

func NewCaches

func NewCaches(ttlsSeconds ...int) Caches

NewCaches initializes the caches. Optionally takes ttls for all caches. len(ttlsSeconds) is expected to be either 0, 1 or len(allCaches). Panics if not.

func (Caches) Close

func (c Caches) Close()

Close closes all caches - best to call it on teardown - ignores errors

func (Caches) RemoveListStorageProviders

func (c Caches) RemoveListStorageProviders(res *provider.ResourceId)

RemoveListStorageProviders removes a reference from the listproviders cache

func (Caches) RemoveStat

func (c Caches) RemoveStat(user *userpb.User, res *provider.ResourceId)

RemoveStat removes a reference from the stat cache

func (Caches) StorageProviderClient

func (c Caches) StorageProviderClient(p provider.ProviderAPIClient) provider.ProviderAPIClient

StorageProviderClient returns a (cached) client pointing to the storageprovider

func (Caches) StorageRegistryClient

func (c Caches) StorageRegistryClient(p registry.RegistryAPIClient) registry.RegistryAPIClient

StorageRegistryClient returns a (cached) client pointing to the storageregistry

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL