utils

package
v0.0.17-dev Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastDbIDToString

func CastDbIDToString(dbID thread.ID) string

func GetThreadContext

func GetThreadContext(parentCtx context.Context, threadName string, dbID thread.ID, hub bool, kc keychain.Keychain, hubAuth hub.HubAuth) (context.Context, error)

Readies a context to access a thread given its name and dbid

func NewDeterministicThreadID

func NewDeterministicThreadID(kc keychain.Keychain, threadVariant DeterministicThreadVariant) (thread.ID, error)

func ParseDbIDFromString

func ParseDbIDFromString(dbID string) (*thread.ID, error)

func RandBytes

func RandBytes(size int) ([]byte, error)

randBytes returns random bytes in a byte slice of size.

Types

type DeterministicThreadVariant

type DeterministicThreadVariant string
const (
	MetathreadThreadVariant DeterministicThreadVariant = "metathread"
)

Jump to

Keyboard shortcuts

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