{"modulePath":"github.com/AliceO2Group/Control","version":"v1.51.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package trg\n\nPackage trg provides integration with the ALICE trigger system.\n\nPackage trg provides integration with the ALICE trigger system.\n\n## Constants\n\n```go\nconst (\n\tTRG_DIAL_TIMEOUT    = 2 * time.Second\n\tTRG_PFR_TIMEOUT     = 5 * time.Second\n\tTRG_LOAD_TIMEOUT    = 5 * time.Second\n\tTRG_START_TIMEOUT   = 5 * time.Second\n\tTRG_STOP_TIMEOUT    = 5 * time.Second\n\tTRG_UNLOAD_TIMEOUT  = 5 * time.Second\n\tTRG_CLEANUP_TIMEOUT = 5 * time.Second\n\tTOPIC               = topic.IntegratedService + topic.Separator + \"trg\"\n)\n```\n\n## Functions\n\n```go\nfunc NewPlugin(endpoint string) integration.Plugin\n```\n\n## Types\n\n```go\ntype CtpStatusReader struct {\n\t*kafka.Reader\n}\n```\nCtpStatusReader reads CTP status messages from Kafka\n\n```go\nfunc NewCtpStatusReader(topic string, groupID string) *CtpStatusReader\n```\nNewCtpStatusReader creates a new reader for CTP status messages\n\n```go\nfunc (r *CtpStatusReader) Next(ctx context.Context) (*trgpb.Status, error)\n```\nNext reads the next CTP status message from Kafka\n\n```go\ntype Plugin struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (p *Plugin) CallStack(data interface{}) (stack map[string]interface{})\n```\n\n```go\nfunc (p *Plugin) Destroy() error\n```\n\n```go\nfunc (p *Plugin) GetConnectionState() string\n```\n\n```go\nfunc (p *Plugin) GetData(_ []any) string\n```\n\n```go\nfunc (p *Plugin) GetEndpoint() string\n```\n\n```go\nfunc (p *Plugin) GetEnvironmentsData(envIds []uid.ID) map[uid.ID]string\n```\n\n```go\nfunc (p *Plugin) GetEnvironmentsShortData(envIds []uid.ID) map[uid.ID]string\n```\n\n```go\nfunc (p *Plugin) GetName() string\n```\n\n```go\nfunc (p *Plugin) GetPrettyName() string\n```\n\n```go\nfunc (p *Plugin) Init(instanceId string) error\n```\n\n```go\nfunc (p *Plugin) ObjectStack(_ map[string]string, _ map[string]string) (stack map[string]interface{})\n```\n\n```go\ntype RpcClient struct {\n\ttrgecspb.CTPdClient\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewClient(cxt context.Context, cancel context.CancelFunc, endpoint string) *RpcClient\n```\n\n```go\nfunc (m *RpcClient) Close() error\n```\n\n```go\nfunc (m *RpcClient) GetConnState() connectivity.State\n```\n\n```go\ntype Run struct {\n\tCardinality RunCardinality\n\tRunNumber   uint32\n\tState       State\n\tDetectors   []system.ID\n\tSkip        bool\n}\n```\n\n```go\ntype RunCardinality int\n```\n\n```go\nconst (\n\tCTP_STANDALONE RunCardinality\n\tCTP_GLOBAL\n)\n```\n\n```go\ntype Runs []Run\n```\n\n```go\ntype State int\n```\n\n```go\nconst (\n\tCTP_LOADED State\n\tCTP_RUNNING\n)\n```\n\n```go\ntype TrgStatus struct {\n\t// Fields from TRG RunList queries\n\tRunCount   int            `json:\"runCount,omitempty\"`\n\tLines      []string       `json:\"lines,omitempty\"`\n\tStructured Runs           `json:\"structured,omitempty\"`\n\tEnvMap     map[uid.ID]Run `json:\"envMap,omitempty\"`\n\n\t// Fields from CTP status Kafka messages\n\tClock                       string   `json:\"clock,omitempty\"`\n\tDetectorsInHoldover         []string `json:\"detectorsInHoldover,omitempty\"`\n\tClockTransitionExpectedTime int64    `json:\"clockTransitionExpectedTime,omitempty\"` // nanoseconds since epoch, 0 if not expected\n}\n```\n\n","path":"github.com/AliceO2Group/Control/core/integration/trg","name":"trg","synopsis":"Package trg provides integration with the ALICE trigger system.","isRedistributable":true}
