Documentation
¶
Index ¶
Constants ¶
View Source
const ConfigFile = "specrig.yaml"
ConfigFile holds what a record cannot learn from the code, at the service's root.
View Source
const Format = "surface/1"
Format is what this package writes under specrig: and the newest it reads.
Variables ¶
View Source
var ErrForeign = errors.New("not a specrig record")
ErrForeign is a file at a record's path that does not say it is one.
View Source
var File = filepath.Join("tests", "surface.yaml")
File is where a service keeps its record, from the module root.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Clients map[string]string `yaml:"clients"`
Prefixes []string `yaml:"prefixes"`
}
func LoadConfig ¶
type Report ¶
type Report struct {
Unconsumed []string `yaml:"unconsumed,omitempty"`
Unpublished []string `yaml:"unpublished,omitempty"`
Unserved []string `yaml:"unserved,omitempty"`
Uncalled []string `yaml:"uncalled,omitempty"`
Ambiguous []string `yaml:"ambiguous,omitempty"`
Hostless []string `yaml:"hostless,omitempty"`
Needless []string `yaml:"needless,omitempty"`
PatternOnly []string `yaml:"pattern_only,omitempty"`
Loops []string `yaml:"loops,omitempty"`
Outside []string `yaml:"outside,omitempty"`
}
type Surface ¶
type Surface struct {
Specrig string `yaml:"specrig"`
Service string `yaml:"service"`
Publishes []string `yaml:"publishes,omitempty"`
Consumes []string `yaml:"consumes,omitempty"`
Serves []string `yaml:"serves,omitempty"`
Calls []string `yaml:"calls,omitempty"`
Clients map[string][]string `yaml:"clients,omitempty"`
// Calls between the module's own domains: a modular monolith's links.
Domains []string `yaml:"domains,omitempty"`
// From the service's specrig.yaml, not its code.
Hosts map[string]string `yaml:"-"`
}
Click to show internal directories.
Click to hide internal directories.