Documentation ¶
Index ¶
- func AgentMetaFromContext(ctx context.Context) *api.AgentMeta
- func AgentMetaFromRawContext(ctx context.Context) (*api.AgentMeta, error)
- func AgentTokenFromContext(ctx context.Context) api.AgentToken
- func InjectAgentMeta(ctx context.Context, agentMeta *api.AgentMeta) context.Context
- func NewTokenCredentials(token string, insecure bool) credentials.PerRPCCredentials
- func StreamAgentMetaInterceptor() ...
- func UnaryAgentMetaInterceptor() ...
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentMetaFromRawContext ¶ added in v0.0.7
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 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.
Click to show internal directories.
Click to hide internal directories.