Documentation ¶
Overview ¶
Package hazelcast is a generated GoMock package.
Index ¶
- Constants
- type HazelcastMapInterface
- type HazelcastMapInterfaceProvider
- type HazelcastStore
- func (s *HazelcastStore) Clear(ctx context.Context) error
- func (s *HazelcastStore) Delete(ctx context.Context, key any) error
- func (s *HazelcastStore) Get(ctx context.Context, key any) (any, error)
- func (s *HazelcastStore) GetType() string
- func (s *HazelcastStore) GetWithTTL(ctx context.Context, key any) (any, time.Duration, error)
- func (s *HazelcastStore) Invalidate(ctx context.Context, options ...lib_store.InvalidateOption) error
- func (s *HazelcastStore) Set(ctx context.Context, key any, value any, options ...lib_store.Option) error
- type MockHazelcastMapInterface
- func (m *MockHazelcastMapInterface) Clear(ctx context.Context) error
- func (m *MockHazelcastMapInterface) EXPECT() *MockHazelcastMapInterfaceMockRecorder
- func (m *MockHazelcastMapInterface) Get(ctx context.Context, key any) (any, error)
- func (m *MockHazelcastMapInterface) GetEntryView(ctx context.Context, key any) (*types.SimpleEntryView, error)
- func (m *MockHazelcastMapInterface) Remove(ctx context.Context, key any) (any, error)
- func (m *MockHazelcastMapInterface) SetWithTTL(ctx context.Context, key, value any, ttl time.Duration) error
- type MockHazelcastMapInterfaceMockRecorder
- func (mr *MockHazelcastMapInterfaceMockRecorder) Clear(ctx interface{}) *gomock.Call
- func (mr *MockHazelcastMapInterfaceMockRecorder) Get(ctx, key interface{}) *gomock.Call
- func (mr *MockHazelcastMapInterfaceMockRecorder) GetEntryView(ctx, key interface{}) *gomock.Call
- func (mr *MockHazelcastMapInterfaceMockRecorder) Remove(ctx, key interface{}) *gomock.Call
- func (mr *MockHazelcastMapInterfaceMockRecorder) SetWithTTL(ctx, key, value, ttl interface{}) *gomock.Call
Constants ¶
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) GetType ¶
func (s *HazelcastStore) GetType() string
GetType returns the store type
func (*HazelcastStore) GetWithTTL ¶
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
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 ¶
func (m *MockHazelcastMapInterface) Clear(ctx context.Context) error
Clear mocks base method.
func (*MockHazelcastMapInterface) EXPECT ¶
func (m *MockHazelcastMapInterface) EXPECT() *MockHazelcastMapInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockHazelcastMapInterface) GetEntryView ¶
func (m *MockHazelcastMapInterface) GetEntryView(ctx context.Context, key any) (*types.SimpleEntryView, error)
GetEntryView 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.