hazelcast

package
v2.3.8 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: MIT, MIT Imports: 11 Imported by: 0

Documentation

Overview

Package hazelcast is a generated GoMock package.

Index

Constants

View Source
const (
	// HazelcastType represents the storage type as a string value
	HazelcastType = "hazelcast"
	// HazelcastTagPattern represents the tag pattern to be used as a key in specified storage
	HazelcastTagPattern = "gocache_tag_%s"

	TagKeyExpiry = 720 * time.Hour
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HazelcastMapInterface

type HazelcastMapInterface interface {
	Get(ctx context.Context, key any) (any, error)
	GetEntryView(ctx context.Context, key any) (*types.SimpleEntryView, error)
	SetWithTTL(ctx context.Context, key any, value any, ttl time.Duration) error
	Remove(ctx context.Context, key any) (any, error)
	Clear(ctx context.Context) error
}

HazelcastMapInterface represents a hazelcast/hazelcast-go-client map

type HazelcastMapInterfaceProvider

type HazelcastMapInterfaceProvider func(ctx context.Context) (HazelcastMapInterface, error)

type HazelcastStore

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

HazelcastStore is a store for Hazelcast

func NewHazelcast

func NewHazelcast(hzClient *hazelcast.Client, mapName string, options ...lib_store.Option) *HazelcastStore

NewHazelcast creates a new store to Hazelcast instance(s)

func (*HazelcastStore) Clear

func (s *HazelcastStore) Clear(ctx context.Context) error

Clear resets all data in the store

func (*HazelcastStore) Delete

func (s *HazelcastStore) Delete(ctx context.Context, key any) error

Delete removes data from Hazelcast for given key identifier

func (*HazelcastStore) Get

func (s *HazelcastStore) Get(ctx context.Context, key any) (any, error)

Get returns data stored from a given key

func (*HazelcastStore) GetType

func (s *HazelcastStore) GetType() string

GetType returns the store type

func (*HazelcastStore) GetWithTTL

func (s *HazelcastStore) GetWithTTL(ctx context.Context, key any) (any, time.Duration, error)

GetWithTTL returns data stored from a given key and its corresponding TTL

func (*HazelcastStore) Invalidate

func (s *HazelcastStore) Invalidate(ctx context.Context, options ...lib_store.InvalidateOption) error

Invalidate invalidates some cache data in Hazelcast for given options

func (*HazelcastStore) Set

func (s *HazelcastStore) Set(ctx context.Context, key any, value any, options ...lib_store.Option) error

Set defines data in Hazelcast for given key identifier

type MockHazelcastMapInterface

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

MockHazelcastMapInterface is a mock of HazelcastMapInterface interface.

func NewMockHazelcastMapInterface

func NewMockHazelcastMapInterface(ctrl *gomock.Controller) *MockHazelcastMapInterface

NewMockHazelcastMapInterface creates a new mock instance.

func (*MockHazelcastMapInterface) Clear

Clear mocks base method.

func (*MockHazelcastMapInterface) EXPECT

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

func (*MockHazelcastMapInterface) Get

func (m *MockHazelcastMapInterface) Get(ctx context.Context, key any) (any, error)

Get mocks base method.

func (*MockHazelcastMapInterface) GetEntryView

func (m *MockHazelcastMapInterface) GetEntryView(ctx context.Context, key any) (*types.SimpleEntryView, error)

GetEntryView mocks base method.

func (*MockHazelcastMapInterface) Remove

func (m *MockHazelcastMapInterface) Remove(ctx context.Context, key any) (any, error)

Remove mocks base method.

func (*MockHazelcastMapInterface) SetWithTTL

func (m *MockHazelcastMapInterface) SetWithTTL(ctx context.Context, key, value any, ttl time.Duration) error

SetWithTTL mocks base method.

type MockHazelcastMapInterfaceMockRecorder

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

MockHazelcastMapInterfaceMockRecorder is the mock recorder for MockHazelcastMapInterface.

func (*MockHazelcastMapInterfaceMockRecorder) Clear

func (mr *MockHazelcastMapInterfaceMockRecorder) Clear(ctx interface{}) *gomock.Call

Clear indicates an expected call of Clear.

func (*MockHazelcastMapInterfaceMockRecorder) Get

func (mr *MockHazelcastMapInterfaceMockRecorder) Get(ctx, key interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockHazelcastMapInterfaceMockRecorder) GetEntryView

func (mr *MockHazelcastMapInterfaceMockRecorder) GetEntryView(ctx, key interface{}) *gomock.Call

GetEntryView indicates an expected call of GetEntryView.

func (*MockHazelcastMapInterfaceMockRecorder) Remove

func (mr *MockHazelcastMapInterfaceMockRecorder) Remove(ctx, key interface{}) *gomock.Call

Remove indicates an expected call of Remove.

func (*MockHazelcastMapInterfaceMockRecorder) SetWithTTL

func (mr *MockHazelcastMapInterfaceMockRecorder) SetWithTTL(ctx, key, value, ttl interface{}) *gomock.Call

SetWithTTL indicates an expected call of SetWithTTL.

Jump to

Keyboard shortcuts

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