juju: github.com/juju/juju/apiserver/facades/agent/metricsender/testing Index | Files

package testing

import "github.com/juju/juju/apiserver/facades/agent/metricsender/testing"

Index

Package Files

mocksender.go

type ErrorSender Uses

type ErrorSender struct {
    Err error
}

ErrorSender implements the metric sender interface and is used to return errors during testing

func (*ErrorSender) Send Uses

func (e *ErrorSender) Send(d []*wireformat.MetricBatch) (*wireformat.Response, error)

Send implements the Send interface returning errors specified in the ErrorSender.

type MockSender Uses

type MockSender struct {
    UnackedBatches      map[string]struct{}
    Data                [][]*wireformat.MetricBatch
    MeterStatusResponse string
}

MockSender implements the metric sender interface.

func (*MockSender) IgnoreBatches Uses

func (m *MockSender) IgnoreBatches(batches ...*state.MetricBatch)

func (*MockSender) Send Uses

func (m *MockSender) Send(d []*wireformat.MetricBatch) (*wireformat.Response, error)

Send implements the Send interface.

Package testing imports 4 packages (graph). Updated 2017-07-13. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).