client

package
v0.0.0-...-ec62d97 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatJSON = "json"
	FormatCBOR = "cbor"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(config *ClientConfig) (*Client, error)

func (*Client) ConnectAndRead

func (c *Client) ConnectAndRead(ctx context.Context) error

type ClientConfig

type ClientConfig struct {
	WebsocketURL      string
	WantedDids        []string
	WantedCollections []string
	ExtraHeaders      map[string]string
}

func DefaultClientConfig

func DefaultClientConfig() *ClientConfig

type Handler

type Handler interface {
	OnEvent(ctx context.Context, event *consumer.Event) error
}

Jump to

Keyboard shortcuts

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