ldcache

package
v1.17.6 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LDCache

type LDCache interface {
	List() ([]string, []string)
}

LDCache represents the interface for performing lookups into the LDCache

func New

func New(logger logger.Interface, root string) (LDCache, error)

New creates a new LDCache with the specified logger and root.

type LDCacheMock added in v1.15.0

type LDCacheMock struct {
	// ListFunc mocks the List method.
	ListFunc func() ([]string, []string)
	// contains filtered or unexported fields
}

LDCacheMock is a mock implementation of LDCache.

func TestSomethingThatUsesLDCache(t *testing.T) {

	// make and configure a mocked LDCache
	mockedLDCache := &LDCacheMock{
		ListFunc: func() ([]string, []string) {
			panic("mock out the List method")
		},
	}

	// use mockedLDCache in code that requires LDCache
	// and then make assertions.

}

func (*LDCacheMock) List added in v1.15.0

func (mock *LDCacheMock) List() ([]string, []string)

List calls ListFunc.

func (*LDCacheMock) ListCalls added in v1.15.0

func (mock *LDCacheMock) ListCalls() []struct {
}

ListCalls gets all the calls that were made to List. Check the length with:

len(mockedLDCache.ListCalls())

Jump to

Keyboard shortcuts

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