tenants

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(ctx context.Context, tenantsClient sm.TenantsClient, tenantCh <-chan sm.Tenant, timeout time.Duration) *Manager

NewTenantManager creates a new tenant manager that is able to retrieve tenants from the remote API using the specified tenantsClient or receive them over the provided tenantCh channel. It will keep them for a duration no longer than `timeout`.

A new goroutine is started which stops when the provided context is cancelled.

func (*Manager) GetTenant

func (tm *Manager) GetTenant(ctx context.Context, req *sm.TenantInfo) (*sm.Tenant, error)

GetTenant retrieves the tenant specified by `req`, either from a local cache or by making a request to the API.

Jump to

Keyboard shortcuts

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