Documentation
¶
Overview ¶
Package generator generates state-machine schemas and grafana dashboards.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenDashboard ¶ added in v0.8.0
func GenDashboard(p cli.GrafanaParams) (*dashboard.Builder, error)
func GenUtilsFile ¶ added in v0.8.0
func GenUtilsFile() string
func MachDashboardEnv ¶ added in v0.10.3
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 SyncDashboard ¶ added in v0.8.0
Types ¶
type SchemaGenerator ¶ added in v0.16.0
type SchemaGenerator struct {
Mach *am.Machine
Name string
// N is the first letter of Name
N string
States []string
StatesAuto []string
StatesMulti []string
Groups []string
// State1 -> Rel -> State2,State3
Relations [][3]string
}
func NewSchemaGenerator ¶ added in v0.16.0
func (*SchemaGenerator) GroupsEnter ¶ added in v0.16.0
func (g *SchemaGenerator) GroupsEnter(e *am.Event) bool
func (*SchemaGenerator) InheritEnter ¶ added in v0.16.0
func (g *SchemaGenerator) InheritEnter(e *am.Event) bool
func (*SchemaGenerator) Output ¶ added in v0.16.0
func (g *SchemaGenerator) Output() string
type SyncTracer ¶ added in v0.10.3
type SyncTracer struct {
*am.TracerNoOp
// contains filtered or unexported fields
}
SyncTracer is am.Tracer for tracing new submachines and syncing the Grafana dashboard.
func (*SyncTracer) MachineInit ¶ added in v0.10.3
func (t *SyncTracer) MachineInit(mach am.Api) context.Context
func (*SyncTracer) NewSubmachine ¶ added in v0.10.3
func (t *SyncTracer) NewSubmachine(parent, mach am.Api)
Click to show internal directories.
Click to hide internal directories.