storageutil

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package storageutil contains utility functions for mesh database interactions.

Index

Constants

This section is empty.

Variables

View Source
var InvalidIDChars = []rune{'/', '\\', ':', '*', '?', '"', '\'', '<', '>', '|', ','}

InvalidIDChars are the characters that are not allowed in node IDs.

View Source
var ReservedNodeIDs = []string{"self", "local", "localhost", "leader", "voters", "observers"}

ReservedNodeIDs are reserved node IDs.

Functions

func ConnectProtoFromEdgeAttrs

func ConnectProtoFromEdgeAttrs(attrs map[string]string) v1.ConnectProtocol

ConnectProtoFromEdgeAttrs returns the protocol for the given edge attributes.

func EdgeAttrsForConnectProto

func EdgeAttrsForConnectProto(proto v1.ConnectProtocol) map[string]string

EdgeAttrsForConnectProto returns the edge attributes for the given protocol.

func IsValidID

func IsValidID(id string) bool

IsValidID returns true if the given identifier is valid and safe to be saved to storage.

func IsValidKey

func IsValidKey(key string) bool

IsValidKey reports that a key is valid. All keys must be non-empty and valid UTF-8.

func IsValidNodeID

func IsValidNodeID(id string) bool

IsValidNodeID returns true if the given node ID is valid and safe to be saved to storage.

Types

This section is empty.

Jump to

Keyboard shortcuts

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