common

package
v0.0.0-...-602a947 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deserialize

func Deserialize(data []byte, entity interface{}) error

func RunTimeBound

func RunTimeBound(sec time.Duration, method func() error, timeoutError error) error

func RunTimeBoundSec

func RunTimeBoundSec(sec int, method func() error, timeoutError error) error

func Serialize

func Serialize(entity interface{}) ([]byte, error)

Types

type Set

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

func NewSet

func NewSet() *Set

func (*Set) Add

func (set *Set) Add(items ...interface{})

add group of elements into the set

func (*Set) Has

func (set *Set) Has(item interface{}) bool

func (*Set) Pop

func (set *Set) Pop() interface{}

func (*Set) Remove

func (set *Set) Remove(items ...interface{})

func (*Set) Size

func (set *Set) Size() int

get size of the set

Jump to

Keyboard shortcuts

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