diff options
Diffstat (limited to 'internal/tree/contract.go')
-rw-r--r-- | internal/tree/contract.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/internal/tree/contract.go b/internal/tree/contract.go new file mode 100644 index 0000000..b949339 --- /dev/null +++ b/internal/tree/contract.go @@ -0,0 +1,23 @@ +package tree + +import ( + "context" + + dmodel "go.neonxp.dev/djson/internal/model" + "go.neonxp.dev/json/model" +) + +type Core interface { + Init() error + Get(nodes []string) (model.Node, error) + Mutation(ctx context.Context, mut *dmodel.Mutation) error + State() CoreState +} + +type CoreState int + +const ( + Running CoreState = iota + Ready + Failed +) |