client

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type SailClient

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

func ProvideSailClient

func ProvideSailClient(dialer SailDialer, addr model.SailURL) *SailClient

func (*SailClient) Connect

func (s *SailClient) Connect(ctx context.Context) error

func (*SailClient) OnChange

func (s *SailClient) OnChange(ctx context.Context, st store.RStore)

func (*SailClient) Teardown

func (s *SailClient) Teardown(ctx context.Context)

type SailConn

type SailConn interface {
	WriteJSON(v interface{}) error
	NextReader() (int, io.Reader, error)
	Close() error
}

type SailDialer

type SailDialer interface {
	DialContext(ctx context.Context, addr string, headers http.Header) (SailConn, error)
}

Helpers for stubbing out the network connection in SailClient

func ProvideSailDialer

func ProvideSailDialer() SailDialer

Jump to

Keyboard shortcuts

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