Documentation
¶
Index ¶
- Constants
- func New(runtimeContext *runtime.Context) *cobra.Command
- func NewFakeActionCapabilities(ctx context.Context, lggr logger.Logger, registry *capabilities.Registry) ([]services.Service, error)
- func ReplaceSecretNamesWithEnvVars(secrets []byte) ([]byte, error)
- type DataPoint
- type Inputs
- type ManualTriggerCapabilitiesConfig
- type ManualTriggers
- type Metric
- type MetricAttribute
- type MetricData
- type MetricsLog
- type MetricsScope
- type ResourceAttribute
- type ScopeMetrics
- type TelemetryLog
- type TriggerInfoAndBeforeStart
Constants ¶
View Source
const ( SEPOLIA_MOCK_KEYSTONE_FORWARDER_ADDRESS = "0x15fC6ae953E024d975e77382eEeC56A9101f9F88" MAINNET_MOCK_KEYSTONE_FORWARDER_ADDRESS = "0xa3d1ad4ac559a6575a114998affb2fb2ec97a7d9" SEPOLIA_CHAIN_SELECTOR = 16015286601757825753 MAINNET_CHAIN_SELECTOR = 5009297550715157269 SEPOLIA_CHAIN_NAME = "ethereum-testnet-sepolia" MAINNET_CHAIN_NAME = "ethereum-mainnet" )
View Source
const ( COLOR_RESET = "\033[0m" COLOR_RED = "\033[91m" // Bright Red COLOR_GREEN = "\033[32m" // Green COLOR_YELLOW = "\033[33m" // Yellow COLOR_BLUE = "\033[34m" // Blue COLOR_MAGENTA = "\033[35m" // Magenta COLOR_CYAN = "\033[36m" // Cyan COLOR_BRIGHT_CYAN = "\033[96m" // Bright Cyan )
Color constants for consistent styling
View Source
const TIMEOUT = 30 * time.Second
Variables ¶
This section is empty.
Functions ¶
func NewFakeActionCapabilities ¶
func NewFakeActionCapabilities(ctx context.Context, lggr logger.Logger, registry *capabilities.Registry) ([]services.Service, error)
NewFakeCapabilities builds faked capabilities, then registers them with the capability registry.
func ReplaceSecretNamesWithEnvVars ¶
Replace secret names with secrets values that must be loaded into the environment by the user
Types ¶
type DataPoint ¶
type DataPoint struct {
Attributes []MetricAttribute `json:"Attributes"`
StartTime string `json:"StartTime"`
Time string `json:"Time"`
Value interface{} `json:"Value"`
}
type Inputs ¶
type Inputs struct {
WorkflowPath string `validate:"required,file"`
ConfigPath string `validate:"omitempty,file,ascii,max=97" cli:"--config"`
SecretsPath string `validate:"omitempty,file,ascii,max=97" cli:"--secrets"`
EngineLogs bool `validate:"omitempty" cli:"--engine-logs"`
Broadcast bool `validate:"-"`
EVMClients map[uint64]*ethclient.Client `validate:"omitempty"` // multichain clients keyed by selector
EthPrivateKey *ecdsa.PrivateKey `validate:"omitempty"`
WorkflowName string `validate:"required"`
// Non-interactive mode options
NonInteractive bool `validate:"-"`
TriggerIndex int `validate:"-"`
HTTPPayload string `validate:"-"` // JSON string or @/path/to/file.json
EVMTxHash string `validate:"-"` // 0x-prefixed
EVMEventIndex int `validate:"-"`
}
type ManualTriggers ¶
type ManualTriggers struct {
ManualCronTrigger *fakes.ManualCronTriggerService
ManualHTTPTrigger *fakes.ManualHTTPTriggerService
ManualEVMChains map[uint64]*fakes.FakeEVMChain
}
func NewManualTriggerCapabilities ¶
func NewManualTriggerCapabilities( ctx context.Context, lggr logger.Logger, registry *capabilities.Registry, cfg ManualTriggerCapabilitiesConfig, dryRunChainWrite bool, ) (*ManualTriggers, error)
func (*ManualTriggers) Close ¶
func (m *ManualTriggers) Close() error
type Metric ¶
type Metric struct {
Name string `json:"Name"`
Description string `json:"Description"`
Unit string `json:"Unit"`
Data MetricData `json:"Data"`
}
type MetricAttribute ¶
type MetricData ¶
type MetricData struct {
DataPoints []DataPoint `json:"DataPoints"`
}
type MetricsLog ¶
type MetricsLog struct {
Resource []ResourceAttribute `json:"Resource"`
ScopeMetrics []ScopeMetrics `json:"ScopeMetrics"`
}
MetricsLog represents OpenTelemetry metrics logs
type MetricsScope ¶
type ResourceAttribute ¶
type ScopeMetrics ¶
type ScopeMetrics struct {
Scope MetricsScope `json:"Scope"`
Metrics []Metric `json:"Metrics"`
}
type TelemetryLog ¶
type TelemetryLog struct {
Severity int `json:"Severity"`
Body struct {
Type string `json:"Type"`
Value string `json:"Value"` // Base64 encoded protobuf
} `json:"Body"`
Attributes []struct {
Key string `json:"Key"`
Value struct {
Type string `json:"Type"`
Value string `json:"Value"`
} `json:"Value"`
} `json:"Attributes"`
}
TelemetryLog represents the JSON structure of telemetry logs from beholder
type TriggerInfoAndBeforeStart ¶
type TriggerInfoAndBeforeStart struct {
TriggerFunc func() error
TriggerToRun *pb.TriggerSubscription
BeforeStart func(ctx context.Context, cfg simulator.RunnerConfig, registry *capabilities.Registry, services []services.Service, triggerSub []*pb.TriggerSubscription)
}
Click to show internal directories.
Click to hide internal directories.