Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormateDate ¶
Types ¶
type DefaultIdempotentKey ¶
type DefaultIdempotentKey struct { Target interface{} Keys FuncKeys KeysTmpl string IgnoreError bool // contains filtered or unexported fields }
func NewIdempotent ¶
func NewIdempotent(keys string) (*DefaultIdempotentKey, error)
func (DefaultIdempotentKey) IdempotentKey ¶
func (d DefaultIdempotentKey) IdempotentKey() (interface{}, error)
type Idempotent ¶
type Idempotent struct { Key *DefaultIdempotentKey Service IdempotentService }
func GetIdempotentWithKeys ¶
func GetIdempotentWithKeys(keys string, service IdempotentService) (*Idempotent, error)
func (Idempotent) Duplicated ¶
func (factory Idempotent) Duplicated(obj interface{}) (bool, error)
type IdempotentKey ¶
type IdempotentKey interface {
IdempotentKey() (interface{}, error)
}
IdempotentKey key interface
type IdempotentService ¶
type IdempotentService interface { //Duplicated Idempotent checking, true if it's duplicated request. Duplicated(key interface{}) (bool, error) Save(key interface{}) error }
IdempotentService Idempotent Service
type InMemoryMap ¶
type InMemoryMap struct {
// contains filtered or unexported fields
}
func NewInMemoryMap ¶
func NewInMemoryMap() *InMemoryMap
func (*InMemoryMap) Duplicated ¶
func (mem *InMemoryMap) Duplicated(key interface{}) (bool, error)
func (*InMemoryMap) Save ¶
func (mem *InMemoryMap) Save(key interface{}) error
type PersistedIdempotent ¶
type PersistedIdempotent struct { File string `default:".idempotent.txt"` Batch uint `default:"100"` Interval string `default:"10s"` Retry uint `default:"3"` // contains filtered or unexported fields }
func (*PersistedIdempotent) Duplicated ¶
func (f *PersistedIdempotent) Duplicated(key interface{}) (bool, error)
func (*PersistedIdempotent) Init ¶
func (f *PersistedIdempotent) Init() error
func (*PersistedIdempotent) Save ¶
func (f *PersistedIdempotent) Save(key interface{}) error
Click to show internal directories.
Click to hide internal directories.