utils

package
v0.0.0-...-bea6d57 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//DbPath Const
	DbPath = "github.com/josercp/stone/badger/db"
)

DbPath Const

Variables

This section is empty.

Functions

func Contains

func Contains(a []string, x string) bool

Contains tells whether a contains x.

func OpenDB

func OpenDB(dir string, opts badger.Options) (*badger.DB, error)

OpenDB Function

func Options

func Options() (badger.Options, error)

Options Func

func Retry

func Retry(dir string, originalOpts badger.Options) (*badger.DB, error)

Retry Function

func SetKnowNodes

func SetKnowNodes(data []string) bool

SetKnowNodes Function

Types

type KnowNodes

type KnowNodes struct {
	IP []string
}

KnowNodes Struct

func DecodeKnowNodes

func DecodeKnowNodes(data []byte) (KnowNodes, error)

DecodeKnowNodes Function

func GetKnowNodes

func GetKnowNodes(data string) KnowNodes

GetKnowNodes Function

func (KnowNodes) EncodeKnowNodes

func (ip KnowNodes) EncodeKnowNodes() []byte

EncodeKnowNodes Function

Jump to

Keyboard shortcuts

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