client

package
v0.0.0-...-7c5bcf4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(config *ClientConfig, logger *slog.Logger, scheduler Scheduler) (*Client, error)

func (*Client) ConnectAndRead

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

type ClientConfig

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

func DefaultClientConfig

func DefaultClientConfig() *ClientConfig

type Scheduler

type Scheduler interface {
	AddWork(ctx context.Context, repo string, evt *models.Event) error
	Shutdown()
}

Directories

Path Synopsis
parallel
Package parallel provides a parallel scheduler that will run work on a fixed number of workers.
Package parallel provides a parallel scheduler that will run work on a fixed number of workers.

Jump to

Keyboard shortcuts

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