config

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateServerOptions added in v0.1.3

func ValidateServerOptions(options ServerOptions) error

Types

type AddRatesOptions added in v0.3.0

type AddRatesOptions struct {
	AdminPrivateKey string `long:"admin-private-key" description:"Private key of the admin to administer the node"`
	MessageFee      uint64 `long:"message-fee"       description:"Message fee"`
	StorageFee      uint64 `long:"storage-fee"       description:"Storage fee"`
	CongestionFee   uint64 `long:"congestion-fee"    description:"Congestion fee"`
	TargetRate      uint64 `long:"target-rate"       description:"Target rate per minute"`
	DelayDays       uint   `long:"delay-days"        description:"Delay the rates going into effect for N days"    default:"0"`
}

type ApiOptions

type ApiOptions struct {
	Port     int `short:"p" long:"port"      description:"Port to listen on"      env:"XMTPD_API_PORT"      default:"5050"`
	HTTPPort int `          long:"http-port" description:"HTTP Port to listen on" env:"XMTPD_HTTP_API_PORT" default:"5055"`
}

type ContractsOptions

type ContractsOptions struct {
	RpcUrl                         string        `long:"rpc-url"                   env:"XMTPD_CONTRACTS_RPC_URL"                   description:"Blockchain RPC URL"`
	NodesContractAddress           string        `long:"nodes-address"             env:"XMTPD_CONTRACTS_NODES_ADDRESS"             description:"Node contract address"`
	MessagesContractAddress        string        `long:"messages-address"          env:"XMTPD_CONTRACTS_MESSAGES_ADDRESS"          description:"Message contract address"`
	IdentityUpdatesContractAddress string        `` /* 128-byte string literal not displayed */
	RateRegistryContractAddress    string        `` /* 126-byte string literal not displayed */
	ChainID                        int           `` /* 171-byte string literal not displayed */
	RegistryRefreshInterval        time.Duration `` /* 169-byte string literal not displayed */
	RatesRefreshInterval           time.Duration `` /* 170-byte string literal not displayed */
	MaxChainDisconnectTime         time.Duration `` /* 170-byte string literal not displayed */
}

type DbOptions

type DbOptions struct {
	ReaderConnectionString string        `long:"reader-connection-string" env:"XMTPD_DB_READER_CONNECTION_STRING" description:"Reader connection string"`
	WriterConnectionString string        `long:"writer-connection-string" env:"XMTPD_DB_WRITER_CONNECTION_STRING" description:"Writer connection string"`
	ReadTimeout            time.Duration `` /* 146-byte string literal not displayed */
	WriteTimeout           time.Duration `` /* 146-byte string literal not displayed */
	MaxOpenConns           int           `` /* 145-byte string literal not displayed */
	WaitForDB              time.Duration `` /* 146-byte string literal not displayed */
	NameOverride           string        `` /* 160-byte string literal not displayed */
}

type GenerateKeyOptions

type GenerateKeyOptions struct{}

type GetAllNodesOptions

type GetAllNodesOptions struct {
	OutFile string `long:"out-file" description:"File to write the nodes to"`
}

type GetNodeOptions added in v0.3.0

type GetNodeOptions struct {
	NodeId int64 `long:"node-id" description:"NodeId of the node to get" required:"true"`
}

type GetPubKeyOptions

type GetPubKeyOptions struct {
	PrivateKey string `long:"private-key" description:"Private key you want the public key for" required:"true"`
}

type GlobalOptions added in v0.1.3

type GlobalOptions struct {
	Contracts ContractsOptions `group:"Contracts Options" namespace:"contracts"`
	Log       LogOptions       `group:"Log Options"       namespace:"log"`
}

type IndexerOptions added in v0.1.1

type IndexerOptions struct {
	Enable bool `long:"enable" env:"XMTPD_INDEXER_ENABLE" description:"Enable the indexer"`
}

type LogOptions

type LogOptions struct {
	LogLevel    string `` /* 208-byte string literal not displayed */
	LogEncoding string `` /* 211-byte string literal not displayed */
}

type MetricsOptions

type MetricsOptions struct {
	Enable  bool   `long:"enable"          env:"XMTPD_METRICS_ENABLE"          description:"Enable the metrics server"`
	Address string `` /* 134-byte string literal not displayed */
	Port    int    `` /* 129-byte string literal not displayed */
}

MetricsOptions are settings used to start a prometheus server

type MigrateNodesOptions added in v0.3.0

type MigrateNodesOptions struct {
	AdminOptions NodeRegistryAdminOptions `group:"Admin Options" namespace:"admin"`
	InFile       string                   `                                        long:"in-file" description:"File to read the nodes from"`
}

type MlsValidationOptions

type MlsValidationOptions struct {
	GrpcAddress string `long:"grpc-address" env:"XMTPD_MLS_VALIDATION_GRPC_ADDRESS" description:"Address of the MLS validation service"`
}

type NetworkAdminOptions added in v0.3.0

type NetworkAdminOptions struct {
	AdminOptions NodeRegistryAdminOptions `group:"Admin Options" namespace:"admin"`
	NodeId       int64                    `                                        long:"node-id" description:"NodeId to add to the network"`
}

type NodeRegistryAdminOptions added in v0.3.0

type NodeRegistryAdminOptions struct {
	AdminPrivateKey string `long:"private-key" description:"Private key of the admin to administer the node" required:"true"`
}

NodeRegistryAdminOptions is the options for the node registry admin. It is intended to be used as a namespace inside a command option struct.

type NodeRegistryManagerOptions added in v0.3.0

type NodeRegistryManagerOptions struct {
	NodePrivateKey string `long:"manager-private-key" description:"Private key of the node manager"`
	NodeId         int64  `long:"node-id"             description:"NodeId of the node to administer"`
}

NodeRegistryManagerOptions is the options for the node registry manager. It is intended to be used as a namespace inside a command option struct.

type PayerOptions

type PayerOptions struct {
	PrivateKey string `long:"private-key" env:"XMTPD_PAYER_PRIVATE_KEY" description:"Private key used to sign blockchain transactions"`
	Enable     bool   `long:"enable"      env:"XMTPD_PAYER_ENABLE"      description:"Enable the payer API"`
}

type ReflectionOptions

type ReflectionOptions struct {
	Enable bool `long:"enable" env:"XMTPD_REFLECTION_ENABLE" description:"Enable GRPC reflection"`
}

ReflectionOptions are settings controlling collection of GRPC reflection settings.

type RegisterNodeOptions

type RegisterNodeOptions struct {
	AdminOptions              NodeRegistryAdminOptions `group:"Admin Options" namespace:"admin"`
	HttpAddress               string                   `` /* 171-byte string literal not displayed */
	OwnerAddress              string                   `` /* 171-byte string literal not displayed */
	SigningKeyPub             string                   `` /* 171-byte string literal not displayed */
	MinMonthlyFeeMicroDollars int64                    `` /* 172-byte string literal not displayed */
	Force                     bool                     `` /* 172-byte string literal not displayed */
}

type ReplicationOptions added in v0.1.1

type ReplicationOptions struct {
	Enable                bool          `long:"enable"                   env:"XMTPD_REPLICATION_ENABLE"           description:"Enable the replication API"`
	SendKeepAliveInterval time.Duration `` /* 156-byte string literal not displayed */
}

type ServerOptions

type ServerOptions struct {
	API           ApiOptions           `group:"API Options"            namespace:"api"`
	Contracts     ContractsOptions     `group:"Contracts Options"      namespace:"contracts"`
	DB            DbOptions            `group:"Database Options"       namespace:"db"`
	Log           LogOptions           `group:"Log Options"            namespace:"log"`
	Indexer       IndexerOptions       `group:"Indexer Options"        namespace:"indexer"`
	Metrics       MetricsOptions       `group:"Metrics Options"        namespace:"metrics"`
	MlsValidation MlsValidationOptions `group:"MLS Validation Options" namespace:"mls-validation"`
	Payer         PayerOptions         `group:"Payer Options"          namespace:"payer"`
	Reflection    ReflectionOptions    `group:"Reflection Options"     namespace:"reflection"`
	Replication   ReplicationOptions   `group:"Replication Options"    namespace:"replication"`
	Signer        SignerOptions        `group:"Signer Options"         namespace:"signer"`
	Sync          SyncOptions          `group:"Sync Options"           namespace:"sync"`
	Tracing       TracingOptions       `group:"DD APM Tracing Options" namespace:"tracing"`
	Version       bool                 `` /* 127-byte string literal not displayed */
}

type SetHttpAddressOptions added in v0.3.0

type SetHttpAddressOptions struct {
	NodeManagerOptions NodeRegistryManagerOptions `group:"Node Manager Options" namespace:"node-manager"`
	Address            string                     `                                                      long:"address" description:"New HTTP address"`
	NodeId             int64                      `                                                      long:"node-id" description:"NodeId to add to the network"`
}

type SetMaxActiveNodesOptions added in v0.3.0

type SetMaxActiveNodesOptions struct {
	AdminOptions   NodeRegistryAdminOptions `group:"Admin Options" namespace:"admin"`
	MaxActiveNodes uint8                    `                                        long:"max-active-nodes" description:"Maximum number of active nodes"`
}

type SetMinMonthlyFeeOptions added in v0.3.0

type SetMinMonthlyFeeOptions struct {
	NodeManagerOptions        NodeRegistryManagerOptions `group:"Node Manager Options" namespace:"node-manager"`
	MinMonthlyFeeMicroDollars int64                      `` /* 145-byte string literal not displayed */
	NodeId                    int64                      `` /* 133-byte string literal not displayed */
}

type SetNodeOperatorCommissionPercentOptions added in v0.3.0

type SetNodeOperatorCommissionPercentOptions struct {
	AdminOptions      NodeRegistryAdminOptions `group:"Admin Options" namespace:"admin"`
	CommissionPercent int64                    `` /* 127-byte string literal not displayed */
}

type SignerOptions

type SignerOptions struct {
	PrivateKey string `long:"private-key" env:"XMTPD_SIGNER_PRIVATE_KEY" description:"Private key used to sign messages"`
}

type SyncOptions added in v0.1.1

type SyncOptions struct {
	Enable bool `long:"enable" env:"XMTPD_SYNC_ENABLE" description:"Enable the sync server"`
}

type TracingOptions

type TracingOptions struct {
	Enable bool `long:"enable" env:"XMTPD_TRACING_ENABLE" description:"Enable DD APM trace collection"`
}

TracingOptions are settings controlling collection of DD APM traces and error tracking.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL