util

package
v0.7.1 Latest Latest
Warning

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

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

Documentation

Overview

Package util 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 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