cache

package
v0.0.0-...-9455615 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Code generated by cache-gen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(updater UpdaterManager) *Manager

func NewManagerFunc

func NewManagerFunc(updateFunc UpdaterManagerFunc) *Manager

func (*Manager) Find

func (mgr *Manager) Find(key int64) *cacheManager

func (*Manager) FindOrCreate

func (mgr *Manager) FindOrCreate(key int64) *cacheManager

func (*Manager) Get

func (mgr *Manager) Get(ctx context.Context, key int64) (*mytypes.UserProfile, err)

func (*Manager) Purge

func (mgr *Manager) Purge(key int64)

func (*Manager) PurgeAll

func (mgr *Manager) PurgeAll()

func (*Manager) Set

func (mgr *Manager) Set(key int64, value *mytypes.UserProfile)

func (*Manager) Snapshot

func (mgr *Manager) Snapshot() map[int64]*mytypes.UserProfile

type UpdaterManager

type UpdaterManager interface {
	Update(ctx context.Context, key int64) (*mytypes.UserProfile, error)
}

type UpdaterManagerFunc

type UpdaterManagerFunc func(ctx context.Context, key int64) (*mytypes.UserProfile, error)

func (UpdaterManagerFunc) Update

Jump to

Keyboard shortcuts

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