ystore

package
v0.0.0-...-99c3f21 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

ystore wraps a proto.Message in a concurrency safe accessor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func New

func New[T any, P storer[T]](ctx context.Context, bkt *blob.Bucket, key string, init func() P) (*Store[P], error)

func (*Store[T]) Do

func (s *Store[T]) Do(ctx context.Context, f func(T))

func (*Store[T]) RDo

func (s *Store[T]) RDo(ctx context.Context, f func(T))

func (*Store[T]) Sync

func (s *Store[T]) Sync(ctx context.Context, force bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳