mutexTypes

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arbitrary

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

Arbitrary is a interface{} wrapped with a sync.RWMutex.

func (*Arbitrary) Get

func (x *Arbitrary) Get() interface{}

Get fetches the stored value in a concurrent safe manner

func (*Arbitrary) Set

func (x *Arbitrary) Set(thing interface{})

Set sets the stored value in a concurrent safe manner

type Bool

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

Bool is a bool wrapped with a sync.RWMutex.

func (*Bool) Get

func (x *Bool) Get() bool

Get fetches the stored value in a concurrent safe manner

func (*Bool) Set

func (x *Bool) Set(thing bool)

Set sets the stored value in a concurrent safe manner

type Duration

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

Duration is a time.Duration wrapped with a sync.RWMutex.

func (*Duration) Get

func (x *Duration) Get() time.Duration

Get fetches the stored value in a concurrent safe manner

func (*Duration) Set

func (x *Duration) Set(thing time.Duration)

Set sets the stored value in a concurrent safe manner

type Int

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

Int is a int wrapped with a sync.RWMutex.

func (*Int) Get

func (x *Int) Get() int

Get fetches the stored value in a concurrent safe manner

func (*Int) Set

func (x *Int) Set(thing int)

Set sets the stored value in a concurrent safe manner

type StringSlice

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

StringSlice is a []string wrapped with a sync.RWMutex.

func (*StringSlice) Get

func (x *StringSlice) Get() []string

Get fetches the stored value in a concurrent safe manner

func (*StringSlice) Set

func (x *StringSlice) Set(thing []string)

Set sets the stored value in a concurrent safe manner

type Time

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

Time is a time.Time wrapped with a sync.RWMutex.

func (*Time) Get

func (x *Time) Get() time.Time

Get fetches the stored value in a concurrent safe manner

func (*Time) Set

func (x *Time) Set(thing time.Time)

Set sets the stored value in a concurrent safe manner

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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