memory

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package memory provides an in-memory implementation of the cluster.Store interface. This is useful for testing without requiring a real distributed cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store implements cluster.Store with in-memory storage for testing.

func New

func New() *Store

New creates a new in-memory cluster store.

func (*Store) Close

func (s *Store) Close(ctx context.Context) error

Close shuts down the store.

func (*Store) Membership

func (s *Store) Membership() cluster.Membership

Membership returns the cluster membership interface.

func (*Store) NewDMap

func (s *Store) NewDMap(name string) (cluster.DMap, error)

NewDMap creates or retrieves a distributed map by name.

func (*Store) PubSub

func (s *Store) PubSub() cluster.PubSub

PubSub returns the pub/sub interface for this cluster.

func (*Store) SetMembers

func (s *Store) SetMembers(members []cluster.Member)

SetMembers allows tests to configure cluster members.

Jump to

Keyboard shortcuts

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