MCPcopy
hub / github.com/fabiolb/fabio / Backend

Interface Backend

registry/backend.go:3–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1package registry
2
3type Backend interface {
4 // Register registers fabio as a service in the registry.
5 Register(services []string) error
6
7 // Deregister removes all service registrations for fabio.
8 DeregisterAll() error
9
10 // Deregister removes the given service registration for fabio.
11 Deregister(service string) error
12
13 // ManualPaths returns the list of paths for which there
14 // are overrides.
15 ManualPaths() ([]string, error)
16
17 // ReadManual returns the current manual overrides and
18 // their version as seen by the registry.
19 ReadManual(path string) (value string, version uint64, err error)
20
21 // WriteManual writes the new value to the registry if the
22 // version of the stored document still matchhes version.
23 WriteManual(path string, value string, version uint64) (ok bool, err error)
24
25 // WatchServices watches the registry for changes in service
26 // registration and health and pushes them if there is a difference.
27 WatchServices() chan string
28
29 // WatchManual watches the registry for changes in the manual
30 // overrides and pushes them if there is a difference.
31 WatchManual() chan string
32
33 // WatchNoRouteHTML watches the registry for changes in the html returned
34 // when a requested route is not found
35 WatchNoRouteHTML() chan string
36}
37
38var Default Backend

Callers 9

initBackendFunction · 0.65
watchBackendFunction · 0.65
mainFunction · 0.65
ServeHTTPMethod · 0.65
ServeHTTPMethod · 0.65
ServeHTTPMethod · 0.65
watchBackendFunction · 0.65
watchBackendFunction · 0.65
watchNoRouteHTMLFunction · 0.65

Implementers 3

beregistry/static/backend.go
beregistry/consul/backend.go
beregistry/custom/backend.go

Calls

no outgoing calls

Tested by

no test coverage detected