Documentation ¶
Overview ¶
Package agent implements the functions, types, and interfaces for the module.
Package agent implements the functions, types, and interfaces for the module.
Package agent implements the functions, types, and interfaces for the module.
Package agent implements the functions, types, and interfaces for the module.
Index ¶
Constants ¶
const ApiVersionV1 = "/api/v1"
ApiVersionV1 defines the version number of the API
const DefaultPrefix = "/api"
DefaultPrefix defines the default API prefix
const DefaultVersion = "v1"
DefaultVersion defines the default API version
Variables ¶
var ErrContextNotFound = errors.New("http context not found")
Functions ¶
func FromHTTPContext ¶ added in v0.1.44
Types ¶
type Agent ¶
Agent is an interface that combines the HTTPAgent and GRPCAgent interfaces
var UnimplementedAgent Agent = &unimplementedAgent{}
func NewAgent ¶ added in v0.1.32
NewAgent creates a new Agent instance that supports both HTTP and gRPC
func NewAgentWithGRPC ¶ added in v0.1.34
NewAgentWithGRPC creates a new Agent instance that only supports gRPC
func NewAgentWithHTTP ¶ added in v0.1.34
NewAgentWithHTTP creates a new Agent instance that only supports HTTP
type GRPCAgent ¶ added in v0.1.32
type GRPCAgent interface { // Server returns an instance of the gRPC server Server() *transgrpc.Server // RegisterService registers a gRPC service RegisterService(desc *grpc.ServiceDesc, impl interface{}) }
GRPCAgent is an interface that defines the basic methods of a gRPC proxy
type HTTPAgent ¶ added in v0.1.32
type HTTPAgent interface { // URI returns the URI of the HTTP service URI() string // HTTPServer returns an instance of the HTTP server HTTPServer() *transhttp.Server // Route returns an instance of the HTTP router Route() *transhttp.Router }
HTTPAgent is an interface that defines the basic methods of an HTTP proxy