config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 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 ApiOptions

type ApiOptions struct {
	Port int `short:"p" long:"port" description:"Port to listen on" env:"XMTPD_API_PORT" default:"5050"`
}

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 */
	ChainID                        int           `` /* 171-byte string literal not displayed */
	RefreshInterval                time.Duration `` /* 169-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{}

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 MlsValidationOptions

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

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 {
	HttpAddress     string `long:"http-address"         description:"HTTP address to register for the node"                            required:"true"`
	OwnerAddress    string `long:"node-owner-address"   description:"Blockchain address of the intended owner of the registration NFT" required:"true"`
	AdminPrivateKey string `long:"admin-private-key"    description:"Private key of the admin to register the node"                    required:"true"`
	SigningKeyPub   string `long:"node-signing-key-pub" description:"Signing key of the node to register"                              required:"true"`
}

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 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.

type UpdateAddressOptions

type UpdateAddressOptions struct {
	PrivateKey string `long:"private-key" description:"Private key of node to be updated"`
	NodeId     int64  `long:"node-id"     description:"NodeId to update"`
	Address    string `long:"address"     description:"New HTTP address"`
}

type UpdateHealthOptions

type UpdateHealthOptions struct {
	AdminPrivateKey string `long:"admin-private-key" description:"Private key of the admin to administer the node"`
	NodeId          int64  `long:"node-id"           description:"NodeId to update"`
}

Jump to

Keyboard shortcuts

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