dynamic

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDynamicAddress is the default address that the dynamic pkg will
	// use if an alternate address is not specified
	DefaultDynamicAddress = "dproxy.batch.sh:443"

	// ReconnectSleep determines the length of time to wait between reconnect attempts to dProxy
	ReconnectSleep = time.Second * 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client services.DProxyClient
	Conn   *grpc.ClientConn
	Token  string

	MessageBus        string
	OutboundMessageCh chan *events.Outbound

	Options *opts.DynamicOptions
	// contains filtered or unexported fields
}

func (*Client) Read

func (d *Client) Read() chan *events.Outbound

func (*Client) Start

func (d *Client) Start(bus string)

Start is called by a backend's Dynamic() method. It authorizes the connection and begins reading a GRPC stream of responses consisting of DynamicReplay protobuf messages

type IDynamic

type IDynamic interface {
	Start(bus string)
	Read() chan *events.Outbound
}

func New

func New(opts *opts.DynamicOptions, bus string) (IDynamic, error)

New validates CLI options and returns a new Client struct

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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