Documentation ¶
Index ¶
- Variables
- func RegisterCacheHandlers(handler *CacheHandler, t *transport.EtcdTransportServer) error
- func RegisterControlPointsHandler(handler FlowControlControlPointsHandler, t *transport.EtcdTransportServer) error
- func RegisterEtcdTransport(in RegisterClientIn)
- func RegisterPreviewHandler(handler *PreviewHandler, t *transport.EtcdTransportServer) error
- type CacheHandler
- func (h *CacheHandler) CacheDelete(ctx context.Context, req *cmdv1.GlobalCacheDeleteRequest) (*flowcontrolv1.CacheDeleteResponse, error)
- func (h *CacheHandler) CacheLookup(ctx context.Context, req *cmdv1.GlobalCacheLookupRequest) (*flowcontrolv1.CacheLookupResponse, error)
- func (h *CacheHandler) CacheUpsert(ctx context.Context, req *cmdv1.GlobalCacheUpsertRequest) (*flowcontrolv1.CacheUpsertResponse, error)
- type FlowControlControlPointsHandler
- type PreviewHandler
- type RegisterClientIn
Constants ¶
This section is empty.
Variables ¶
var Module = fx.Options( grpcclient.ClientConstructor{ Name: "agent-functions", ConfigKey: afconfig.Key + ".client.grpc", }.Annotate(), fx.Provide( NewFlowControlControlPointsHandler, ProvidePreviewHandler, NewCacheHandler, ), fx.Invoke( RegisterEtcdTransport, RegisterControlPointsHandler, RegisterPreviewHandler, RegisterCacheHandlers, ), )
Module provides rpc client for agent functions.
Functions ¶
func RegisterCacheHandlers ¶ added in v2.25.0
func RegisterCacheHandlers(handler *CacheHandler, t *transport.EtcdTransportServer) error
RegisterCacheHandlers registers cache handler functions in handler registry.
func RegisterControlPointsHandler ¶
func RegisterControlPointsHandler(handler FlowControlControlPointsHandler, t *transport.EtcdTransportServer) error
RegisterControlPointsHandler registers ControlPointsHandler in handler registry.
func RegisterEtcdTransport ¶ added in v2.20.0
func RegisterEtcdTransport(in RegisterClientIn)
RegisterEtcdTransport registers a server on the etcd transport.
func RegisterPreviewHandler ¶
func RegisterPreviewHandler(handler *PreviewHandler, t *transport.EtcdTransportServer) error
RegisterPreviewHandler registers PreviewHandler in handler registry.
Types ¶
type CacheHandler ¶ added in v2.25.0
type CacheHandler struct {
// contains filtered or unexported fields
}
CacheHandler is a handler for cache-family of functions.
func NewCacheHandler ¶ added in v2.25.0
NewCacheHandler creates a new CacheHandler.
func (*CacheHandler) CacheDelete ¶ added in v2.25.0
func (h *CacheHandler) CacheDelete(ctx context.Context, req *cmdv1.GlobalCacheDeleteRequest) (*flowcontrolv1.CacheDeleteResponse, error)
CacheDelete deletes given keys from the cache.
func (*CacheHandler) CacheLookup ¶ added in v2.25.0
func (h *CacheHandler) CacheLookup(ctx context.Context, req *cmdv1.GlobalCacheLookupRequest) (*flowcontrolv1.CacheLookupResponse, error)
CacheLookup looks up given keys in the cache.
func (*CacheHandler) CacheUpsert ¶ added in v2.25.0
func (h *CacheHandler) CacheUpsert(ctx context.Context, req *cmdv1.GlobalCacheUpsertRequest) (*flowcontrolv1.CacheUpsertResponse, error)
CacheUpsert inserts or updates given keys into the cache.
type FlowControlControlPointsHandler ¶
type FlowControlControlPointsHandler struct {
// contains filtered or unexported fields
}
FlowControlControlPointsHandler is a handler for ListFlowControlPoints function
Note: There's no requirement every handler needs to be in a separate struct. More methods can be added to this one.
func NewFlowControlControlPointsHandler ¶
func NewFlowControlControlPointsHandler( cache *cache.Cache[selectors.TypedControlPointID], agentInfo *agentinfo.AgentInfo, ) FlowControlControlPointsHandler
NewFlowControlControlPointsHandler returns a new FlowControlControlPointsHandler.
func (*FlowControlControlPointsHandler) ListFlowControlPoints ¶
func (h *FlowControlControlPointsHandler) ListFlowControlPoints( ctx context.Context, _ *cmdv1.ListFlowControlPointsRequest, ) (*cmdv1.ListFlowControlPointsAgentResponse, error)
ListFlowControlPoints lists currently discovered control points.
type PreviewHandler ¶
type PreviewHandler struct {
// contains filtered or unexported fields
}
PreviewHandler is a handler for preview-family of functions.
Simply forwards methods to grpc handler, which provides actual implementation.
func ProvidePreviewHandler ¶
func ProvidePreviewHandler( handler *preview.Handler, unmarshaller config.Unmarshaller, ) (*PreviewHandler, error)
ProvidePreviewHandler provides PreviewHandler.
func (*PreviewHandler) PreviewFlowLabels ¶
func (h *PreviewHandler) PreviewFlowLabels( ctx context.Context, req *cmdv1.PreviewFlowLabelsRequest, ) (*previewv1.PreviewFlowLabelsResponse, error)
PreviewFlowLabels previews flow labels on given control point.
func (*PreviewHandler) PreviewHTTPRequests ¶
func (h *PreviewHandler) PreviewHTTPRequests( ctx context.Context, req *cmdv1.PreviewHTTPRequestsRequest, ) (*previewv1.PreviewHTTPRequestsResponse, error)
PreviewHTTPRequests previews HTTP requests on given control point.
type RegisterClientIn ¶
type RegisterClientIn struct { fx.In Lc fx.Lifecycle Unmarshaller config.Unmarshaller ConnBuilder grpcclient.ClientConnectionBuilder `name:"agent-functions"` EtcdTransportServer *transport.EtcdTransportServer EtcdClient *etcdclient.Client }
RegisterClientIn are parameters for InvokeClient function.