package store
import "github.com/mesos/mesos-go/api/v1/lib/extras/store"
Index ¶
- Constants
- func GetIgnoreErrors(g Getter) func() string
- func GetOrPanic(g Getter) func() string
- func SetOrPanic(s Setter) func(v string)
- type Error
- type GetFunc
- type GetFuncDecorator
- func DoGet() GetFuncDecorator
- func (f GetFuncDecorator) AndThen(f2 GetFuncDecorator) GetFuncDecorator
- func (f GetFuncDecorator) Decorate(s Singleton) Singleton
- type Getter
- type SetFunc
- type SetFuncDecorator
- func DoSet() SetFuncDecorator
- func (f SetFuncDecorator) AndThen(f2 SetFuncDecorator) SetFuncDecorator
- func (f SetFuncDecorator) Decorate(s Singleton) Singleton
- type Setter
- type Singleton
- func DecorateSingleton(s Singleton, ds ...SingletonDecorator) Singleton
- func NewInMemorySingleton() Singleton
- type SingletonAdapter
- type SingletonDecorator
Constants ¶
const ErrNotFound = Error("value not found in store")
Functions ¶
func GetIgnoreErrors ¶
func GetOrPanic ¶
GetOrPanic curries the result of a Getter invocation: the returned func only ever returns the string component when the error component of the underlying Get() call is nil. If Get() generates an error then the curried func panics.
func SetOrPanic ¶
SetOrPanic curries the result of a Setter invocation: the returned func only ever returns normally when the error component of the underlying Set() call is nil. If Set() generates an error then the curried func panics.
Types ¶
type Error ¶
type Error string
func (Error) Error ¶
type GetFunc ¶
func (GetFunc) Get ¶
type GetFuncDecorator ¶
func DoGet ¶
func DoGet() GetFuncDecorator
func (GetFuncDecorator) AndThen ¶
func (f GetFuncDecorator) AndThen(f2 GetFuncDecorator) GetFuncDecorator
func (GetFuncDecorator) Decorate ¶
func (f GetFuncDecorator) Decorate(s Singleton) Singleton
type Getter ¶
type SetFunc ¶
func (SetFunc) Set ¶
type SetFuncDecorator ¶
func DoSet ¶
func DoSet() SetFuncDecorator
func (SetFuncDecorator) AndThen ¶
func (f SetFuncDecorator) AndThen(f2 SetFuncDecorator) SetFuncDecorator
func (SetFuncDecorator) Decorate ¶
func (f SetFuncDecorator) Decorate(s Singleton) Singleton
type Setter ¶
type Singleton ¶
Singleton is a thread-safe abstraction to load and store a string
func DecorateSingleton ¶
func DecorateSingleton(s Singleton, ds ...SingletonDecorator) Singleton
func NewInMemorySingleton ¶
func NewInMemorySingleton() Singleton
type SingletonAdapter ¶
type SingletonDecorator ¶
Source Files ¶
- Version
- v0.0.11 (latest)
- Published
- May 15, 2020
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 1 hour ago –
Tools for package owners.