Documentation
¶
Overview ¶
Package namespace is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestFromSpec ¶
func RequestFromSpec(ns myspec.Namespace) (*admin.NamespaceAddRequest, error)
RequestFromSpec returns a namespace add request from a cluster spec namespace config.
Types ¶
type Client ¶
type Client interface { // Create will create a namepace for the given request. Create(request *admin.NamespaceAddRequest) error // List will retrieve all namespaces in the current cluster. The registry in // the namespace response is guaranteed to be non-nil if err == nil. List() (*admin.NamespaceGetResponse, error) // Delete will delete a namespace given a name Delete(namespace string) error }
Client provides the interface to interact with the namespace API
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) Create ¶
func (m *MockClient) Create(request *admin.NamespaceAddRequest) error
Create mocks base method
func (*MockClient) Delete ¶
func (m *MockClient) Delete(namespace string) error
Delete mocks base method
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockClient) List ¶
func (m *MockClient) List() (*admin.NamespaceGetResponse, error)
List mocks base method
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient
func (*MockClientMockRecorder) Create ¶
func (mr *MockClientMockRecorder) Create(request interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockClientMockRecorder) Delete ¶
func (mr *MockClientMockRecorder) Delete(namespace interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockClientMockRecorder) List ¶
func (mr *MockClientMockRecorder) List() *gomock.Call
List indicates an expected call of List
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option provides an interface that can be used for setter options with the constructor
func WithClient ¶
WithClient configures an m3admin client.
func WithLogger ¶
WithLogger is a setter to override the default logger
type Preset ¶
type Preset string
Preset represents a predfined namespace.
const ( // PresetTenSecondsTwoDaysIndexed stores metrics at 10 second resolution for // two days with a block size of 2h. BufferPast and BufferFuture are both 10m. // Snapshotting is enabled. Metrics are indexed based on tags. PresetTenSecondsTwoDaysIndexed Preset = "10s:2d" // PresetOneMinuteFourtyDaysIndexed stores metrics at 10 second resolution for // two days with a block size of 2h. BufferPast and BufferFuture are both 10m. // Snapshotting is enabled. Metrics are indexed based on tags. PresetOneMinuteFourtyDaysIndexed Preset = "1m:40d" )