Documentation ¶
Index ¶
- Constants
- func DialWithOptions(target string, secure bool) (cConn *grpc.ClientConn, err error)
- func FromContext(ctx context.Context, key ContextKey) (string, bool)
- func Load(spec any) error
- func NewContext(ctx context.Context, key ContextKey, value string) context.Context
- type ContextKey
- type Deployments
Constants ¶
View Source
const Timeout = 1 * time.Second
Variables ¶
This section is empty.
Functions ¶
func DialWithOptions ¶
func DialWithOptions(target string, secure bool) (cConn *grpc.ClientConn, err error)
func FromContext ¶
func FromContext(ctx context.Context, key ContextKey) (string, bool)
func NewContext ¶
Types ¶
type ContextKey ¶
type ContextKey string
const ( TokenContextKey ContextKey = "bearer" UIDContextKey ContextKey = "uid" )
type Deployments ¶
type Deployments string
const ( DeploymentsLocal Deployments = "local" DeploymentsDev Deployments = "dev" DeploymentsProd Deployments = "prod" )
func ParseDeployments ¶
func ParseDeployments(value string) Deployments
func (Deployments) String ¶
func (d Deployments) String() string
Click to show internal directories.
Click to hide internal directories.