tenant

package
v0.0.0-...-9960df0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrTenantNotFound if the tenant could not be found by ID or username
	ErrTenantNotFound = errors.New("tenant not found")
)

Functions

This section is empty.

Types

type Postgres

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

func NewPostgres

func NewPostgres(db *sql.DB) *Postgres

func (*Postgres) PrometheusURL

func (p *Postgres) PrometheusURL(username string) (*url.URL, error)

type Static

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

Static database of tenants

func NewStatic

func NewStatic(tenants map[string]Tenant) *Static

NewStatic returns a static database with given tenants

func (*Static) PrometheusURL

func (s *Static) PrometheusURL(username string) (*url.URL, error)

PrometheusURL returns the tenant's Prometheus URL by its username

type Tenant

type Tenant struct {
	ID            string
	JaegerURL     *url.URL
	PrometheusURL *url.URL
}

Tenant of gosip

Jump to

Keyboard shortcuts

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