apiutil

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentMetaFromContext

func AgentMetaFromContext(ctx context.Context) *api.AgentMeta

func AgentMetaFromRawContext added in v0.0.7

func AgentMetaFromRawContext(ctx context.Context) (*api.AgentMeta, error)

func AgentTokenFromContext added in v0.0.7

func AgentTokenFromContext(ctx context.Context) api.AgentToken

AgentTokenFromContext extracts the agent token from the given context

func InjectAgentMeta added in v0.0.7

func InjectAgentMeta(ctx context.Context, agentMeta *api.AgentMeta) context.Context

func NewTokenCredentials

func NewTokenCredentials(token string, insecure bool) credentials.PerRPCCredentials

func StreamAgentMetaInterceptor added in v0.0.7

func StreamAgentMetaInterceptor() func(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

StreamAgentMetaInterceptor is a gRPC server-side interceptor that populates context with api.AgentMeta for streaming RPCs.

func UnaryAgentMetaInterceptor added in v0.0.7

func UnaryAgentMetaInterceptor() func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

UnaryAgentMetaInterceptor is a gRPC server-side interceptor that populates context with api.AgentMeta for unary RPCs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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