context

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractErrorFromStatus added in v0.4.7

func ExtractErrorFromStatus(err error) error

ExtractErrorFromStatus extracts the error from the status

func GetCtxWithMetadata

func GetCtxWithMetadata(ctxMetadata *CtxMetadata, ctx context.Context) context.Context

GetCtxWithMetadata gets the context with the metadata

Types

type CtxMetadata

type CtxMetadata struct {
	Token MetadataField
}

CtxMetadata is the metadata for the context

func NewCtxMetadata

func NewCtxMetadata(token string) *CtxMetadata

NewCtxMetadata creates a new CtxMetadata

type MetadataField

type MetadataField struct {
	Key   string
	Value string
}

MetadataField is a field in the metadata

Jump to

Keyboard shortcuts

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