hzl

package
v0.0.0-...-1be65ac Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteArraySerializer

type ByteArraySerializer struct{}

func (*ByteArraySerializer) ID

func (s *ByteArraySerializer) ID() int32

func (*ByteArraySerializer) Read

func (s *ByteArraySerializer) Read(input serialization.DataInput) interface{}

func (*ByteArraySerializer) Write

func (s *ByteArraySerializer) Write(output serialization.DataOutput, obj interface{})

type Cache

type Cache struct {
	Client *hazelcast.Client
}

func New

func New(ctx context.Context, config hazelcast.Config, opts ...Option) (*Cache, error)

type Client

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

func (*Client) Close

func (c *Client) Close() error

func (*Client) Done

func (c *Client) Done() <-chan struct{}

func (*Client) Error

func (c *Client) Error() error

func (*Client) GetMap

func (c *Client) GetMap() cache.Map[any]

func (*Client) Hazelcast

func (c *Client) Hazelcast() *hazelcast.Client

func (*Client) Running

func (c *Client) Running() bool

type Map

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

func NewMap

func NewMap(client Client) *Map

func (*Map) Clear

func (c *Map) Clear(ctx context.Context, ns string) error

func (*Map) Delete

func (c *Map) Delete(ctx context.Context, ns, id string) (s int, err error)

func (*Map) Get

func (c *Map) Get(ctx context.Context, ns, id string) db.Result

func (*Map) GetAll

func (c *Map) GetAll(ctx context.Context, ns string) (*db.ResultSet, error)

func (*Map) GetKey

func (c *Map) GetKey(ctx context.Context, ns, id string, p *path.Path) (zero types.Entry, err error)

func (*Map) GetKeys

func (c *Map) GetKeys(ctx context.Context, ns, id string, p []*path.Path) ([]types.Entry, error)

func (*Map) GetView

func (c *Map) GetView(ctx context.Context, ns, id string) (view *types.SimpleEntryView, err error)

func (*Map) Insert

func (c *Map) Insert(ctx context.Context, ns, id string, src any, ttl ...time.Duration) (s db.Stat, err error)

func (*Map) IsLocked

func (c *Map) IsLocked(ctx context.Context, ns string, id string) (bool, error)

func (*Map) Lock

func (c *Map) Lock(ctx context.Context, ns string, id string) error

func (*Map) NewLockContext

func (c *Map) NewLockContext(ctx context.Context, ns string) context.Context

func (*Map) SetKey

func (c *Map) SetKey(ctx context.Context, ns, id string, e types.Entry) (err error)

func (*Map) SetKeys

func (c *Map) SetKeys(ctx context.Context, ns, id string, entries []types.Entry) (err error)

func (*Map) SetTTL

func (c *Map) SetTTL(ctx context.Context, ns, id string, ttl time.Duration) error

func (*Map) Size

func (c *Map) Size(ctx context.Context, ns string) (int, error)

func (*Map) Unlock

func (c *Map) Unlock(ctx context.Context, ns string, id string, force bool) error

func (*Map) Update

func (c *Map) Update(ctx context.Context, ns, id string, src any, ttl ...time.Duration) (s db.Stat, err error)

type Option

type Option func(*options)

Jump to

Keyboard shortcuts

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