interfaces

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector added in v0.1.12

type Collector[S any, T any, R any] interface {
	Builder() S
	Append(builder S, element T)
	Finish(builder S) R
}

type Delete

type Delete[K constraints.Key, V any] interface {
	Delete(key K)
}

type DurationGenerator

type DurationGenerator interface {
	Duration() time.Duration
}

type FileSystem added in v0.3.3

type FileSystem interface {
	Mkdir(name string, perm fs.FileMode) error
	OpenFile(name string, flag int, perm fs.FileMode) (fs.File, error)
	RemoveAll(name string) error
	Rename(oldName, newName string) error
	Stat(name string) (fs.FileInfo, error)
}

type Get

type Get[K constraints.Key, V any] interface {
	Get(key K) V
}

type IdGenerator

type IdGenerator[T constraints.ID] interface {
	Id() T
}

type Init

type Init interface {
	Init()
}

type Invoker added in v0.3.9

type Invoker interface {
	Invoke() error
}

type Key

type Key[T constraints.Key] interface {
	Key() T
}

type Set

type Set[K constraints.Key, V any] interface {
	Set(key K, v V)
}

type SetWithExpire

type SetWithExpire[K constraints.Key, V any] interface {
	SetWithExpire(key K, v V, expire time.Duration)
}

type Store

type Store[K constraints.Key, V any] interface {
	Set[K, V]
	Get[K, V]
	Delete[K, V]
}

type StoreWithExpire

type StoreWithExpire[K constraints.Key, V any] interface {
	SetWithExpire[K, V]
	Get[K, V]
	Delete[K, V]
}

type TaskRetry added in v0.3.0

type TaskRetry interface {
	Do(times uint) (retry bool)
}

Jump to

Keyboard shortcuts

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