client

package
v0.0.0-...-a7b4c27 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublishURL           = "/events"
	CreateURL            = "/events/subscriptions"
	ListURL              = "/events/subscriptions"
	GetURLFormat         = "/events/subscriptions/%s"
	UpdateURLFormat      = "/events/subscriptions/%s"
	DeleteURLFormat      = "/events/subscriptions/%s"
	HandshakeURLFormat   = "/events/subscriptions/%s/handshake"
	UpdateStateURLFormat = "/events/subscriptions/%s/state"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(client httpclient.BaseURLAwareClient) *Client

func (Client) Create

func (c Client) Create(subscription *types.Subscription) (*types.CreateResponse, error)

func (Client) Delete

func (c Client) Delete(name string) (*types.DeleteResponse, error)

func (Client) Get

func (c Client) Get(name string) (*types.Subscription, *types.Response, error)

func (Client) GetHTTPClient

func (c Client) GetHTTPClient() httpclient.BaseURLAwareClient

func (Client) List

func (c Client) List() (*types.Subscriptions, *types.Response, error)

func (Client) Publish

func (c Client) Publish(event cloudevents.Event, qos types.Qos) (*types.PublishResponse, error)

func (Client) TriggerHandshake

func (c Client) TriggerHandshake(name string) (*types.TriggerHandshake, error)

func (Client) Update

func (c Client) Update(name string, webhookAuth *types.WebhookAuth) (*types.UpdateResponse, error)

Update updates the EventMesh Subscription WebhookAuth config.

func (Client) UpdateState

func (c Client) UpdateState(name string, state types.State) (*types.UpdateStateResponse, error)

type EventPublisher

type EventPublisher interface {
	Publish(cloudEvent cloudevents.Event, qos types.Qos) (*types.PublishResponse, error)
}

type PublisherManager

type PublisherManager interface {
	EventPublisher
	SubscriptionManager
}

type SubscriptionManager

type SubscriptionManager interface {
	Create(subscription *types.Subscription) (*types.CreateResponse, error)
	List() (*types.Subscriptions, *types.Response, error)
	Get(name string) (*types.Subscription, *types.Response, error)
	Update(name string, webhookAuth *types.WebhookAuth) (*types.UpdateResponse, error)
	Delete(name string) (*types.DeleteResponse, error)
	TriggerHandshake(name string) (*types.TriggerHandshake, error)
	UpdateState(name string, state types.State) (*types.UpdateStateResponse, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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