mcache

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonValuer added in v0.0.2

type JsonValuer[T any] struct {
	// contains filtered or unexported fields
}

func Json added in v0.0.2

func Json[T any](cache *MCache) JsonValuer[T]

func (JsonValuer[T]) Get added in v0.0.2

func (v JsonValuer[T]) Get(key string) (T, bool, error)

func (JsonValuer[T]) Set added in v0.0.2

func (v JsonValuer[T]) Set(key string, data T, ttl time.Duration) error

type MCache

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

func New

func New() *MCache

type ProtobufGogoValuer added in v0.0.5

type ProtobufGogoValuer[T gogo_proto.Message] struct {
	// contains filtered or unexported fields
}

func ProtobufGogo added in v0.0.5

func ProtobufGogo[T gogo_proto.Message](cache *MCache) ProtobufGogoValuer[T]

func (ProtobufGogoValuer[T]) Get added in v0.0.5

func (v ProtobufGogoValuer[T]) Get(key string) (T, bool, error)

func (ProtobufGogoValuer[T]) Set added in v0.0.5

func (v ProtobufGogoValuer[T]) Set(key string, data T, ttl time.Duration) error

type ProtobufValuer added in v0.0.4

type ProtobufValuer[T proto.Message] struct {
	// contains filtered or unexported fields
}

func Protobuf added in v0.0.4

func Protobuf[T proto.Message](cache *MCache) ProtobufValuer[T]

func (ProtobufValuer[T]) Get added in v0.0.4

func (v ProtobufValuer[T]) Get(key string) (T, bool, error)

func (ProtobufValuer[T]) Set added in v0.0.4

func (v ProtobufValuer[T]) Set(key string, data T, ttl time.Duration) error

type RawValuer added in v0.0.2

type RawValuer[T comparable] struct {
	// contains filtered or unexported fields
}

func Raw added in v0.0.2

func Raw[T comparable](cache *MCache) RawValuer[T]

func (RawValuer[T]) Get added in v0.0.2

func (v RawValuer[T]) Get(key string) (T, bool)

func (RawValuer[T]) Set added in v0.0.2

func (v RawValuer[T]) Set(key string, data T, ttl time.Duration) error

Directories

Path Synopsis
internal
pb

Jump to

Keyboard shortcuts

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