mock

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllMastersListener

type AllMastersListener struct {
	mock.Mock
}

implements MasterChanged and AllMasters extension

func (*AllMastersListener) OnMasterChanged

func (a *AllMastersListener) OnMasterChanged(mi *mesos.MasterInfo)

func (*AllMastersListener) UpdatedMasters

func (a *AllMastersListener) UpdatedMasters(mi []*mesos.MasterInfo)

type Client

type Client struct {
	mock.Mock
}

func NewClient

func NewClient(testZkPath string, initialChildren ...string) (mocked *Client, snaps chan []string, errs chan error)

newMockZkClient returns a mocked implementation of ZKInterface that implements expectations for Stop() and Stopped(); multiple calls to Stop() are safe.

func (*Client) Data

func (m *Client) Data(path string) (a []byte, b error)

func (*Client) Stop

func (m *Client) Stop()

func (*Client) Stopped

func (m *Client) Stopped() (a <-chan struct{})

func (*Client) WatchChildren

func (m *Client) WatchChildren(path string) (a string, b <-chan []string, c <-chan error)

type Connector

type Connector struct {
	mock.Mock
}

Impersontates a zk.Connection It implements interface Connector

func NewConnector

func NewConnector() *Connector

func (*Connector) Children

func (conn *Connector) Children(path string) ([]string, *zk.Stat, error)

func (*Connector) ChildrenW

func (conn *Connector) ChildrenW(path string) ([]string, *zk.Stat, <-chan zk.Event, error)

func (*Connector) Close

func (conn *Connector) Close()

func (*Connector) Get

func (conn *Connector) Get(path string) ([]byte, *zk.Stat, error)

Jump to

Keyboard shortcuts

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