client

package
v0.0.0-...-5c89c01 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultClient

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

DefaultClient - default client that connects to webhookrelay service via gRPC protocol

func NewDefaultClient

func NewDefaultClient(opts *Opts) *DefaultClient

NewDefaultClient - create new default client with given options

func (*DefaultClient) RelayReady

func (c *DefaultClient) RelayReady() <-chan bool

RelayReady - relay notification channel, closed when relay is ready

func (*DefaultClient) StartRelay

func (c *DefaultClient) StartRelay(ctx context.Context, filter *Filter) error

StartRelay - starts relay agent

type Filter

type Filter struct {
	Bucket, Destination string
	Buckets             []string // multiple bucket filtering based on name or ID
}

Filter - optional filter that can be passed to the server

type Opts

type Opts struct {
	HTTPClient              *http.Client
	AccessKey, AccessSecret string
	// Optional way to turn off TLS certificate validation
	InsecureSkipVerify bool
	Forwarder          forward.Forwarder
	Debug              bool
	Logger             *zap.SugaredLogger
	// Websocket server address, defaults to
	// wss://my.webhookrelay.com/
	ServerAddress string
}

Opts - client configuration

type WebhookRelayClient

type WebhookRelayClient interface {
	// start webhook relay
	StartRelay(ctx context.Context, filter *Filter) error
	RelayReady() <-chan bool
}

Jump to

Keyboard shortcuts

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