package generator
Import Path
github.com/pancsta/asyncmachine-go/tools/generator (on go.dev)
Dependency Relation
imports 21 packages, and imported by 3 packages
Involved Source Files
grafana.go
Package generator generates state-machine schemas and grafana dashboards.
Package-Level Type Names (total 2)
Groups []string
Mach *am.Machine
N is the first letter of Name
Name string
State1 -> Rel -> State2,State3
States []string
StatesAuto []string
StatesMulti []string
(*SchemaGenerator) GroupsEnter(e *am.Event) bool
(*SchemaGenerator) InheritEnter(e *am.Event) bool
(*SchemaGenerator) Output() string
func NewSchemaGenerator(ctx context.Context, param cli.SFParams) (*SchemaGenerator, error)
SyncTracer is [am.Tracer] for tracing new submachines and syncing the Grafana
dashboard.
NoOpTracer *am.NoOpTracer
( SyncTracer) HandlerEnd(transition *machine.Transition, emitter string, handler string)
( SyncTracer) HandlerStart(transition *machine.Transition, emitter string, handler string)
( SyncTracer) Inheritable() bool
( SyncTracer) MachineDispose(machID string)
(*SyncTracer) MachineInit(mach am.Api) context.Context
( SyncTracer) MutationQueued(machine machine.Api, mutation *machine.Mutation)
(*SyncTracer) NewSubmachine(parent, mach am.Api)
( SyncTracer) QueueEnd(machine machine.Api)
( SyncTracer) SchemaChange(machine machine.Api, old machine.Schema)
( SyncTracer) TransitionEnd(transition *machine.Transition)
( SyncTracer) TransitionInit(transition *machine.Transition)
( SyncTracer) TransitionStart(transition *machine.Transition)
( SyncTracer) VerifyStates(machine machine.Api)
*SyncTracer : github.com/pancsta/asyncmachine-go/pkg/machine.Tracer
Package-Level Functions (total 5)
func GenDashboard(p cli.GrafanaParams) (*dashboard.Builder, error) func GenUtilsFile() string
MachDashboardEnv binds a Grafana dashboard generator to the [mach], based on
environment variables:
- AM_GRAFANA_URL: the Grafana URL
- AM_GRAFANA_TOKEN: the Grafana API token
- AM_SERVICE: the service name
This tracer is inherited by submachines, and this function applies only to
top-level machines.
func NewSchemaGenerator(ctx context.Context, param cli.SFParams) (*SchemaGenerator, error) func SyncDashboard(ctx context.Context, p cli.GrafanaParams, builder *dashboard.Builder) error![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |