utils

package
v0.1.150 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEnvironment = "local"

Variables

This section is empty.

Functions

func ApiEdgeToProtoMap added in v0.1.148

func ApiEdgeToProtoMap(node *v1alpha1.TinyNode, edge *v1alpha1.TinyNodeEdge, data map[string]interface{}) (map[string]interface{}, error)

func ApiNodeToMap added in v0.1.148

func ApiNodeToMap(node v1alpha1.TinyNode, data map[string]interface{}, minimal bool) map[string]interface{}

func CheckForError added in v0.1.146

func CheckForError(input interface{}) error

CheckForError takes any input and returns the error if it is one, otherwise nil.

func ExportNodes added in v0.1.148

func ExportNodes(nodesMap map[string]v1alpha1.TinyNode) ([]interface{}, error)

func GetConfigurableDefinitions added in v0.1.148

func GetConfigurableDefinitions(node v1alpha1.TinyNode, from *string) map[string]*ajson.Node

func GetEnvironmentName

func GetEnvironmentName() string

func GetFlowMaps added in v0.1.148

func GetFlowMaps(nodesMap map[string]v1alpha1.TinyNode) (map[string][]byte, map[string][]v1alpha1.TinyNodePortConfig, map[string][]Destination, map[string]*ajson.Node, map[string]struct{}, error)

func GetPortFullName

func GetPortFullName(nodeID string, portName string) string

func IsLeader added in v0.1.147

func IsLeader(ctx context.Context) bool

IsLeader checks if the current context indicates leadership status

func NodesToGraph added in v0.1.148

func NodesToGraph(elements map[string]v1alpha1.TinyNode, flowName *string) ([]interface{}, []interface{}, error)

func ParseFullPortName added in v0.1.0

func ParseFullPortName(name string) (node string, port string)

func RemoveSliceElement added in v0.1.0

func RemoveSliceElement[T any](slice []T, s int) []T

func SanitizeResourceName added in v0.1.0

func SanitizeResourceName(in string) string

func WithLeader added in v0.1.147

func WithLeader(ctx context.Context, isLeader bool) context.Context

Types

type Destination added in v0.1.148

type Destination struct {
	Name string
	// if destination is a source port
	Configuration []byte
}

Jump to

Keyboard shortcuts

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