m3admin

package
v0.1.6 Latest Latest
Warning

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

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

Documentation

Overview

Package m3admin is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotOk indicates that HTTP status was not Ok
	ErrNotOk = errors.New("status not ok")

	// ErrNotFound indicates that HTTP status was not found
	ErrNotFound = errors.New("status not found")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	DoHTTPRequest(action, url string, data *bytes.Buffer) (*http.Response, error)
}

Client is an m3admin client.

func NewClient

func NewClient(clientOpts ...Option) Client

NewClient returns a new m3admin client.

type MockClient

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

MockClient is a mock of Client interface

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance

func (*MockClient) DoHTTPRequest

func (m *MockClient) DoHTTPRequest(action, url string, data *bytes.Buffer) (*http.Response, error)

DoHTTPRequest mocks base method

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient

func (*MockClientMockRecorder) DoHTTPRequest

func (mr *MockClientMockRecorder) DoHTTPRequest(action, url, data interface{}) *gomock.Call

DoHTTPRequest indicates an expected call of DoHTTPRequest

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option configures an m3admin client.

func WithHTTPClient

func WithHTTPClient(cl *retryhttp.Client) Option

WithHTTPClient configures an http client for the m3admin client. If not set, go-retryablehttp's default client will be used. Note that the retry client's logger will be overridden with the stdlog-wrapped wrapped zap logger.

func WithLogger

func WithLogger(l *zap.Logger) Option

WithLogger configures a logger for the client. If not set a noop logger will be used.

Directories

Path Synopsis
Package namespace is a generated GoMock package.
Package namespace is a generated GoMock package.
Package placement is a generated GoMock package.
Package placement is a generated GoMock package.

Jump to

Keyboard shortcuts

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