store_test

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewXMetricsStoreMockGenerator

func NewXMetricsStoreMockGenerator(num int, data string) func([]string, func(interface{}) []metric.FamilyInterface, context.Context, dynamic.Interface, string, schema.GroupVersionResource, string) store.IXMetricsStore

Types

type ResponseWriterMock

type ResponseWriterMock struct {
	Data string
}

func (*ResponseWriterMock) Header

func (w *ResponseWriterMock) Header() http.Header

func (*ResponseWriterMock) Write

func (w *ResponseWriterMock) Write(d []byte) (int, error)

func (*ResponseWriterMock) WriteHeader

func (w *ResponseWriterMock) WriteHeader(statusCode int)

type XMetricsStoreMock

type XMetricsStoreMock struct {
	Num       int
	WriteData string
	// contains filtered or unexported fields
}

func (*XMetricsStoreMock) Add

func (x *XMetricsStoreMock) Add(interface{}) error

func (*XMetricsStoreMock) Delete

func (s *XMetricsStoreMock) Delete(obj interface{}) error

func (*XMetricsStoreMock) Get

func (s *XMetricsStoreMock) Get(obj interface{}) (item interface{}, exists bool, err error)

Get implements the Get method of the store interface.

func (*XMetricsStoreMock) GetByKey

func (s *XMetricsStoreMock) GetByKey(key string) (item interface{}, exists bool, err error)

GetByKey implements the GetByKey method of the store interface.

func (*XMetricsStoreMock) GetCallbacUid

func (x *XMetricsStoreMock) GetCallbacUid() string

func (*XMetricsStoreMock) GetCallback

func (x *XMetricsStoreMock) GetCallback() (string, func() (schema.GroupVersionResource, int))

func (*XMetricsStoreMock) List

func (s *XMetricsStoreMock) List() []interface{}

List implements the List method of the store interface.

func (*XMetricsStoreMock) ListKeys

func (s *XMetricsStoreMock) ListKeys() []string

ListKeys implements the ListKeys method of the store interface.

func (*XMetricsStoreMock) Replace

func (s *XMetricsStoreMock) Replace(list []interface{}, _ string) error

Replace will delete the contents of the store, using instead the given list.

func (*XMetricsStoreMock) Resync

func (s *XMetricsStoreMock) Resync() error

Resync implements the Resync method of the store interface.

func (*XMetricsStoreMock) Update

func (s *XMetricsStoreMock) Update(obj interface{}) error

func (*XMetricsStoreMock) WriteAll

func (x *XMetricsStoreMock) WriteAll(w io.Writer)

nolint: errcheck

Jump to

Keyboard shortcuts

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