Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Send(event []events.CloudEvent) error SendOne(event *events.CloudEvent) error Validate(event []events.CloudEvent) error ValidateOne(event *events.CloudEvent) error }
Client specifies an interface that event-driver clients must implement.
func NewHTTPClient ¶
func NewHTTPClient(opts ...HTTPClientOpt) (Client, error)
NewHTTPClient returns new instance of driverclient.Client using HTTPClient implementation
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient implements event driver client using HTTP protocol
func (*HTTPClient) Send ¶
func (c *HTTPClient) Send(evs []events.CloudEvent) error
Send sends slice of vents to Dispatch system. It runs Validate() first.
func (*HTTPClient) SendOne ¶
func (c *HTTPClient) SendOne(event *events.CloudEvent) error
SendOne sends single event to Dispatch system. It runs Validate() first.
func (*HTTPClient) Validate ¶
func (c *HTTPClient) Validate(evs []events.CloudEvent) error
Validate validates slice of events without sending it
func (*HTTPClient) ValidateOne ¶
func (c *HTTPClient) ValidateOne(event *events.CloudEvent) error
ValidateOne validates single event without sending it
type HTTPClientOpt ¶
type HTTPClientOpt func(client *HTTPClient) error
HTTPClientOpt allows customization of HTTPClient
func WithTracer ¶
func WithTracer(t opentracing.Tracer) HTTPClientOpt
WithTracer allows setting custom tracer
type PipeClient ¶
type PipeClient struct { }
PipeClient implements Event Driver client using named pipes.
func (PipeClient) Send ¶
func (PipeClient) Send(event []events.CloudEvent) error
Send sends slice of events to event driver sidecar
func (PipeClient) SendOne ¶
func (PipeClient) SendOne(event *events.CloudEvent) error
SendOne sends single event to event driver sidecar
func (PipeClient) Validate ¶
func (PipeClient) Validate(event []events.CloudEvent) error
Validate validates list of events without sending them.
func (PipeClient) ValidateOne ¶
func (PipeClient) ValidateOne(event *events.CloudEvent) error
ValidateOne validates single event without sending it.