util

package
v0.0.0-...-a5c5f28 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxExpireAt = 1e15
)

Variables

This section is empty.

Functions

func Compress

func Compress(src []byte) []byte

func ExpireAtToTTLms

func ExpireAtToTTLms(expireat int64) (int64, bool)

func IsExpired

func IsExpired(expireat int64) bool

func Nowms

func Nowms() int64

func Num64

func Num64(i interface{}) interface{}

func ParseInt

func ParseInt(i interface{}) (int64, error)

func TTLmsToExpireAt

func TTLmsToExpireAt(ttlms int64) (int64, bool)

func TTLsToExpireAt

func TTLsToExpireAt(ttls int64) (int64, bool)

func Uncompress

func Uncompress(src []byte) ([]byte, error)

Types

type MarkSet

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

func (*MarkSet) Has

func (s *MarkSet) Has(key []byte) bool

func (*MarkSet) Len

func (s *MarkSet) Len() int

func (*MarkSet) Set

func (s *MarkSet) Set(key []byte)

Jump to

Keyboard shortcuts

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