config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RunLocally      bool
	SearchAddr      string
	RateAddr        string
	ProfileAddr     string
	UserAddr        string
	ReservationAddr string
	FrontendAddr    string
	Debug           bool
)

Functions

func DebugLog

func DebugLog(format string, v ...interface{})

func FindURLFromName

func FindURLFromName(nodes []Node, targetName string) (string, bool)

func GetCallGraph

func GetCallGraph() map[string]map[string][]string

func GetCharonConfigs

func GetCharonConfigs() map[string][]Config

func GetDownstreamNames

func GetDownstreamNames() map[string][]string

func GetDownstreamNames() map[string][]string {

func GetDownstreamURLs

func GetDownstreamURLs() map[string][]string

func GetServerConfigs

func GetServerConfigs() map[string][]Config

func InitializeBreakwaterd

func InitializeBreakwaterd(bwConfig bw.BWParameters)

InitializeBreakwaterd initializes Breakwater instances for each downstream service

func MergeDownstreamURLs

func MergeDownstreamURLs(callGraph map[string]map[string][]string) map[string][]string

func ReplaceDownstreamNamesWithUrls

func ReplaceDownstreamNamesWithUrls(callGraph map[string]map[string][]string, nodes []Node) map[string]map[string][]string

func SwapKeys

func SwapKeys(applications []Application) map[string]map[string][]string

Types

type Application

type Application struct {
	CallGraph map[string][]string `yaml:"callgraph"`
	Interface string              `yaml:"interface"`
}

Application represents the call graph structure

type Config

type Config struct {
	Name  string `yaml:"name"`
	Value string `yaml:"value"`
}

Config represents a configuration entry

type Node

type Node struct {
	Name       string   `yaml:"name"`
	Value      string   `yaml:"value"`
	URL        string   `yaml:"URL"`
	Charon     []Config `yaml:"charon"`
	Downstream []string `yaml:"downstream"`
	Server     []Config `yaml:"server"`
	ID         string   `yaml:"id"`
}

Node represents a node in the call graph

func GetNodes

func GetNodes() []Node

func GetNodes() []Node returns the list of nodes

type ServiceData

type ServiceData struct {
	CallGraph    map[string][]string
	Downstreams  []string
	ServerConfig []Config
	CharonConfig []Config
}

Jump to

Keyboard shortcuts

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