utils

package
v0.0.0-...-80caa2b Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrChannelClosed = errors.New("channel was closed")

Functions

func RecvWithContext

func RecvWithContext[T any](channel <-chan T, ctx context.Context) (data T, err error)

func RecvWithTimeout

func RecvWithTimeout[T any](channel <-chan T, timeout time.Duration) (data T, err error)

func SendWithContext

func SendWithContext[T any](channel chan<- T, data T, ctx context.Context) error

func SendWithTimeout

func SendWithTimeout[T any](channel chan<- T, data T, timeout time.Duration) error

Types

type Secret

type Secret string

func (Secret) GoString

func (Secret) GoString() string

func (Secret) MarshalJSON

func (s Secret) MarshalJSON() ([]byte, error)

func (*Secret) Reveal

func (s *Secret) Reveal() string

func (Secret) String

func (Secret) String() string

Jump to

Keyboard shortcuts

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