Documentation ¶
Overview ¶
Package namespace adds a concept of tenancy to OpenMeter allowing to segment clients.
Index ¶
- type Handler
- type Manager
- func (m Manager) CreateDefaultNamespace(ctx context.Context) error
- func (m Manager) CreateNamespace(ctx context.Context, name string) error
- func (m Manager) DeleteNamespace(ctx context.Context, name string) error
- func (m Manager) GetDefaultNamespace() string
- func (m Manager) IsManagementDisabled() bool
- type ManagerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { CreateNamespace(ctx context.Context, name string) error DeleteNamespace(ctx context.Context, name string) error }
Handler is responsible for creating a namespace in a given component.
An empty name means a default namespace is supposed to be created. The concept of a default namespace is implementation specific.
The behavior for trying to create a namespace that already exists is unspecified at the moment.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is responsible for managing namespaces in different components.
func NewManager ¶
func NewManager(config ManagerConfig) (*Manager, error)
func (Manager) CreateDefaultNamespace ¶
CreateDefaultNamespace orchestrates the creation of a default namespace.
The concept of a default namespace is implementation specific.
func (Manager) CreateNamespace ¶
CreateNamespace orchestrates namespace creation across different components.
func (Manager) DeleteNamespace ¶
DeleteNamespace orchestrates namespace creation across different components.