lib, lang, engine: local: Add Value mechanisms to local API

This expands the Local API with the first (and in theory, only ever) API
for reading and writing simple values. This is a coordination point for
resources and functions to share things directly.
This commit is contained in:
James Shubin
2023-12-03 15:36:03 -05:00
parent 3e37a60635
commit c05af3b9b3
5 changed files with 345 additions and 15 deletions

View File

@@ -477,13 +477,13 @@ func (obj *Main) Run() error {
}()
// implementation of the Local API (we only expect just this single one)
localAPI := &local.API{
localAPI := (&local.API{
Prefix: fmt.Sprintf("%s/", path.Join(prefix, "local")),
Debug: obj.Flags.Debug,
Logf: func(format string, v ...interface{}) {
log.Printf("local: api: "+format, v...)
},
}
}).Init()
// implementation of the World API (alternatives can be substituted in)
world := &etcd.World{