Documentation
¶
Index ¶
- func Root(out, errOut io.Writer) *cobra.Command
- func Serve(p Params) error
- type Headers
- type KafkaBroker
- type KafkaConfig
- type Params
- type Service
- func (s *Service) Close() error
- func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Service) SetAuthWebhook(endpoint *url.URL, headers Headers) error
- func (s *Service) SetDiscovery(orchestrators []*url.URL, grants ...string) error
- func (s *Service) SetPayerPolicy(policy pm.PayerPolicy) error
- func (s *Service) SetPaymentChain(chain pm.PayerChain)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Headers ¶
Headers is a text scalar for configuration and secret files. It accepts comma-separated Header: value entries, with CSV quoting for values containing commas. Header names are case-insensitive and repeated names retain all values.
func (Headers) MarshalText ¶
MarshalText sorts names for deterministic secret-file comparisons and auth policy fingerprints, and quotes entries containing commas or quotation marks.
func (*Headers) UnmarshalText ¶
type KafkaBroker ¶
KafkaBroker supplies the default scheme before URL parsing, which would otherwise interpret host:port as scheme:opaque or reject bare IP addresses.
func (KafkaBroker) MarshalText ¶
func (b KafkaBroker) MarshalText() ([]byte, error)
func (KafkaBroker) String ¶
func (b KafkaBroker) String() string
func (*KafkaBroker) UnmarshalText ¶
func (b *KafkaBroker) UnmarshalText(data []byte) error
type KafkaConfig ¶
type KafkaConfig struct {
Broker KafkaBroker `name:"broker" required:"true" descr:"One Kafka bootstrap address (TLS by default; kafka:// selects plaintext)"`
Topic string `name:"topic" required:"true" descr:"Kafka topic for signing events"`
AuthMethod string `` /* 162-byte string literal not displayed */
Username string `name:"username" optional:"true" secret:"true"`
Password string `name:"password" optional:"true" secret:"true"`
UsernameFile string `basepath:"source" name:"username-file" secretfor:"Username"`
PasswordFile string `basepath:"source" name:"password-file" secretfor:"Password"`
OutboxDB string `name:"outbox-db" file:"optional" default:"events.sqlite" descr:"Durable signer event SQLite path"`
OutboxMaxBytes int64 `name:"outbox-max-bytes" default:"268435456" min:"1" descr:"Maximum pending event payload bytes"`
}
KafkaConfig is a named Boa parameter group: [Kafka] in TOML, --kafka-* flags, and LIVEPEER_SIGNER_KAFKA_* environment variables.
func (KafkaConfig) Validate ¶
func (c KafkaConfig) Validate() error
type Params ¶
type Params struct {
ConfigFile string `` /* 151-byte string literal not displayed */
nodeconfig.Settings
Account *ethcommon.Address `descr:"Keystore account address"`
Kafka *KafkaConfig `optional:"true"`
AuthWebhookHeadersFile string `basepath:"source" name:"auth-webhook-headers-file" secretfor:"AuthWebhookHeaders"`
AuthWebhook *url.URL `name:"auth-webhook" optional:"true" secret:"true"`
AuthWebhookFile string `basepath:"source" name:"auth-webhook-file" secretfor:"AuthWebhook"`
AuthWebhookHeaders Headers `name:"auth-webhook-headers" optional:"true" secret:"true"`
MaxTicketEV *big.Rat `name:"max-ticket-ev" default:"3000000000000" descr:"Maximum expected ticket value in wei"`
MaxBatchEV *big.Rat `name:"max-batch-ev" default:"20000000000000" descr:"Maximum expected batch value in wei"`
DepositMultiplier int64 `name:"deposit-multiplier" default:"1" min:"1" descr:"Maximum face value is deposit divided by this value"`
MaxHourlyPrice *big.Rat `name:"max-hourly-price" required:"true" descr:"Maximum live price in USD per hour"`
MaxFixedPrice *big.Rat `name:"max-fixed-price" required:"true" descr:"Maximum fixed request price in USD"`
WeiPerUSD *big.Rat `name:"wei-per-usd" optional:"true" descr:"Fixed wei per USD conversion, mostly for testing"`
ETHUSDFeed ethcommon.Address `name:"eth-usd-feed" optional:"true" descr:"ETH/USD oracle address"`
ETHUSDMaxAge time.Duration `name:"eth-usd-max-age" default:"2h" descr:"Maximum age of the ETH/USD oracle observation"`
Listen netip.AddrPort `name:"listen" default:"127.0.0.1:8937"`
MetricsListen netip.AddrPort `name:"metrics-listen" default:"127.0.0.1:8938"`
RPCURL *url.URL `name:"rpc-url" secret:"true" required:"true"`
RPCURLFile string `basepath:"source" name:"rpc-url-file" secretfor:"RPCURL"`
ChainID *uint64 `name:"chain-id" min:"1" descr:"Optional expected RPC chain ID"`
Controller ethcommon.Address `name:"controller-address" optional:"true" descr:"Livepeer Controller address"`
KeystoreFile string `basepath:"source" optional:"true" descr:"Encrypted geth account JSON file; otherwise discover in keystore/"`
KeystorePassword *string `secret:"true" required:"true" descr:"Keystore decryption password"`
KeystorePasswordFile string `basepath:"source" secretfor:"KeystorePassword" descr:"Owner-only file containing the exact keystore password bytes"`
Orchestrators []boa.Text[*url.URL] `name:"orchestrators" optional:"true"`
DiscoveryGrants []string `name:"discovery-grants" optional:"true" descr:"Private discovery IP[:port] or CIDR grants"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) SetAuthWebhook ¶
func (*Service) SetDiscovery ¶
SetDiscovery configures discovery sources. Private destinations, including redirect targets, require a discovery grant.
func (*Service) SetPayerPolicy ¶
func (s *Service) SetPayerPolicy(policy pm.PayerPolicy) error
func (*Service) SetPaymentChain ¶
func (s *Service) SetPaymentChain(chain pm.PayerChain)