client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MPL-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	sielink.Link

	// DialAndHandle initiates a connection to the provided URL and
	// runs the Link protocol over this connection. It returns an error,
	// if any, when the connection ends.
	DialAndHandle(uri string) error

	// Subscribe requests data available on the supplied channels
	// from the servers.
	Subscribe(channels ...uint32)
}

A Client Link allows the caller to subscribe to a number of channels in addition to the base Link functionality.

func NewClient

func NewClient(conf *Config) Client

NewClient creates a Link appropriate for use as a client for uploading and subscribing to data from a collection of routers.

type Config

type Config struct {
	Heartbeat time.Duration
	URL       string
	APIKey    string
	TLSConfig *tls.Config
}

Config contains the configuration for a sieproto Client link.

Jump to

Keyboard shortcuts

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