namespace

package
v4.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// DefaultNamespace used by the server
	DefaultNamespace = "micro"
	// NamespaceKey is used to set/get the namespace from the context
	NamespaceKey = "Micro-Namespace"
)

Variables

This section is empty.

Functions

func Add

func Add(namespace, env string) error

Add a namespace to an environment

func ContextWithNamespace

func ContextWithNamespace(ctx context.Context, ns string) context.Context

ContextWithNamespace sets the namespace in the context

func FromContext

func FromContext(ctx context.Context) string

FromContext gets the namespace from the context

func Get

func Get(env string) (string, error)

Get the current namespace for an environment

func List

func List(env string) ([]string, error)

List the namespaces for an environment

func Remove

func Remove(namespace, env string) error

Remove a namespace from an environment

func Set

func Set(namespace, env string) error

Set the current namespace for an environment

Types

This section is empty.

Jump to

Keyboard shortcuts

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