inmemory

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

inmemory contains an implementation of the Radius data store interface that stores data in memory. This is suitable for testing and development purposes. The in-memory store has no persistence and will be **SLOW** for large data sets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is an in-memory implementation of store.StorageClient.

func NewClient

func NewClient() *Client

NewClient creates a new in-memory store client.

func (*Client) Clear

func (c *Client) Clear()

Clear can be used to clear all stored data.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, id string, options ...store.DeleteOptions) error

Delete implements store.StorageClient.

func (*Client) Get

func (c *Client) Get(ctx context.Context, id string, options ...store.GetOptions) (*store.Object, error)

Get implements store.StorageClient.

func (*Client) Query

func (c *Client) Query(ctx context.Context, query store.Query, options ...store.QueryOptions) (*store.ObjectQueryResult, error)

Query implements store.StorageClient.

func (*Client) Save

func (c *Client) Save(ctx context.Context, obj *store.Object, options ...store.SaveOptions) error

Save implements store.StorageClient.

Jump to

Keyboard shortcuts

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