safe

package
v2.0.0-...-ec94ed8 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OperationWithRecover

func OperationWithRecover(operation backoff.Operation) backoff.Operation

OperationWithRecover wrap a backoff operation in a Recover.

Types

type Safe

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

Safe contains a thread-safe value.

func New

func New(value interface{}) *Safe

New create a new Safe instance given a value.

func (*Safe) Get

func (s *Safe) Get() interface{}

Get returns the value.

func (*Safe) Set

func (s *Safe) Set(value interface{})

Set sets a new value.

Jump to

Keyboard shortcuts

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