expire

package
v0.0.0-...-b371d68 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const EXPSUB = "e"
View Source
const TBUCK = 0x3fffffffff // ~5 mins

Variables

View Source
var (
	ErrInvalidLengthExpwire        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowExpwire          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupExpwire = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type D

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

func New

func New(name string, db ExStorer, exp uint64) *D

func (*D) Add

func (d *D) Add(key string, shard uint32, exp uint64)

func (*D) Close

func (d *D) Close()

func (*D) Expire

func (d *D) Expire() uint64

type ExStorer

type ExStorer interface {
	Del(rec *acproto.ACPY2MapDatum) error
	GetInternal(string, string) ([]byte, bool)
	SetInternal(string, string, []byte)
	DelInternal(string, string)
	DelExpired(string, uint32, uint64)
	Range(string, string, string, func(string, []byte) bool)
	IterVersion(uint64, uint64, func(string, uint64, uint32) bool)
}

type KeyShardPair

type KeyShardPair struct {
	Shard uint32 `protobuf:"varint,1,opt,name=shard,proto3" json:"shard,omitempty"`
	Key   string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}

func (*KeyShardPair) Descriptor

func (*KeyShardPair) Descriptor() ([]byte, []int)

func (*KeyShardPair) Equal

func (this *KeyShardPair) Equal(that interface{}) bool

func (*KeyShardPair) GetKey

func (m *KeyShardPair) GetKey() string

func (*KeyShardPair) GetShard

func (m *KeyShardPair) GetShard() uint32

func (*KeyShardPair) GoString

func (this *KeyShardPair) GoString() string

func (*KeyShardPair) Marshal

func (m *KeyShardPair) Marshal() (dAtA []byte, err error)

func (*KeyShardPair) MarshalTo

func (m *KeyShardPair) MarshalTo(dAtA []byte) (int, error)

func (*KeyShardPair) MarshalToSizedBuffer

func (m *KeyShardPair) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*KeyShardPair) ProtoMessage

func (*KeyShardPair) ProtoMessage()

func (*KeyShardPair) Reset

func (m *KeyShardPair) Reset()

func (*KeyShardPair) Size

func (m *KeyShardPair) Size() (n int)

func (*KeyShardPair) String

func (this *KeyShardPair) String() string

func (*KeyShardPair) Unmarshal

func (m *KeyShardPair) Unmarshal(dAtA []byte) error

func (*KeyShardPair) XXX_DiscardUnknown

func (m *KeyShardPair) XXX_DiscardUnknown()

func (*KeyShardPair) XXX_Marshal

func (m *KeyShardPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyShardPair) XXX_Merge

func (m *KeyShardPair) XXX_Merge(src proto.Message)

func (*KeyShardPair) XXX_Size

func (m *KeyShardPair) XXX_Size() int

func (*KeyShardPair) XXX_Unmarshal

func (m *KeyShardPair) XXX_Unmarshal(b []byte) error

type Wire

type Wire struct {
	Pairs []*KeyShardPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs,omitempty"`
}

func (*Wire) Descriptor

func (*Wire) Descriptor() ([]byte, []int)

func (*Wire) Equal

func (this *Wire) Equal(that interface{}) bool

func (*Wire) GetPairs

func (m *Wire) GetPairs() []*KeyShardPair

func (*Wire) GoString

func (this *Wire) GoString() string

func (*Wire) Marshal

func (m *Wire) Marshal() (dAtA []byte, err error)

func (*Wire) MarshalTo

func (m *Wire) MarshalTo(dAtA []byte) (int, error)

func (*Wire) MarshalToSizedBuffer

func (m *Wire) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Wire) ProtoMessage

func (*Wire) ProtoMessage()

func (*Wire) Reset

func (m *Wire) Reset()

func (*Wire) Size

func (m *Wire) Size() (n int)

func (*Wire) String

func (this *Wire) String() string

func (*Wire) Unmarshal

func (m *Wire) Unmarshal(dAtA []byte) error

func (*Wire) XXX_DiscardUnknown

func (m *Wire) XXX_DiscardUnknown()

func (*Wire) XXX_Marshal

func (m *Wire) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Wire) XXX_Merge

func (m *Wire) XXX_Merge(src proto.Message)

func (*Wire) XXX_Size

func (m *Wire) XXX_Size() int

func (*Wire) XXX_Unmarshal

func (m *Wire) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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