Documentation ¶
Index ¶
- Constants
- Variables
- func CLIFlags(envPrefix string) []cli.Flag
- func CheckRequired(ctx *cli.Context) error
- func LoadStoreRouter(cfg CLIConfig, ctx context.Context, log log.Logger) (*store.Router, error)
- func ReadCommitmentMode(r *http.Request) (commitments.CommitmentMode, error)
- func WithLogging(handleFn func(http.ResponseWriter, *http.Request) error, log log.Logger) func(http.ResponseWriter, *http.Request)
- func WithMetrics(handleFn func(http.ResponseWriter, *http.Request) error, m metrics.Metricer) func(http.ResponseWriter, *http.Request) error
- type CLIConfig
- type Config
- type Server
- func (svr *Server) Endpoint() string
- func (svr *Server) GetMemStats() *store.Stats
- func (svr *Server) GetS3Stats() *store.Stats
- func (svr *Server) HandleGet(w http.ResponseWriter, r *http.Request) error
- func (svr *Server) HandlePut(w http.ResponseWriter, r *http.Request) error
- func (svr *Server) Health(w http.ResponseWriter, r *http.Request) error
- func (svr *Server) Port() int
- func (svr *Server) Start() error
- func (svr *Server) Stop() error
- func (svr *Server) WriteBadRequest(w http.ResponseWriter, msg string)
- func (svr *Server) WriteInternalError(w http.ResponseWriter, err error)
- func (svr *Server) WriteNotFound(w http.ResponseWriter, msg string)
- func (svr *Server) WriteResponse(w http.ResponseWriter, data []byte)
Constants ¶
View Source
const ( EigenDADisperserRPCFlagName = "eigenda-disperser-rpc" EthRPCFlagName = "eigenda-eth-rpc" SvcManagerAddrFlagName = "eigenda-svc-manager-addr" EthConfirmationDepthFlagName = "eigenda-eth-confirmation-depth" StatusQueryRetryIntervalFlagName = "eigenda-status-query-retry-interval" StatusQueryTimeoutFlagName = "eigenda-status-query-timeout" DisableTlsFlagName = "eigenda-disable-tls" ResponseTimeoutFlagName = "eigenda-response-timeout" CustomQuorumIDsFlagName = "eigenda-custom-quorum-ids" SignerPrivateKeyHexFlagName = "eigenda-signer-private-key-hex" PutBlobEncodingVersionFlagName = "eigenda-put-blob-encoding-version" DisablePointVerificationModeFlagName = "eigenda-disable-point-verification-mode" // Kzg flags G1PathFlagName = "eigenda-g1-path" G2TauFlagName = "eigenda-g2-tau-path" CachePathFlagName = "eigenda-cache-path" MaxBlobLengthFlagName = "eigenda-max-blob-length" MemstoreFlagName = "memstore.enabled" MemstoreExpirationFlagName = "memstore.expiration" // S3 flags S3BucketFlagName = "s3.bucket" S3EndpointFlagName = "s3.endpoint" S3AccessKeyIDFlagName = "s3.access-key-id" // #nosec G101 S3AccessKeySecretFlagName = "s3.access-key-secret" // #nosec G101 )
View Source
const ( ListenAddrFlagName = "addr" PortFlagName = "port" )
View Source
const ( GetRoute = "/get/" PutRoute = "/put/" DomainFilterKey = "domain" CommitmentModeKey = "commitment_mode" )
View Source
const BytesPerSymbol = 31
View Source
const EnvVarPrefix = "EIGENDA_PROXY"
View Source
const MaxCodingRatio = 8
Variables ¶
View Source
var ( ListenAddrFlag = &cli.StringFlag{ Name: ListenAddrFlagName, Usage: "server listening address", Value: "127.0.0.1", EnvVars: prefixEnvVars("ADDR"), } PortFlag = &cli.IntFlag{ Name: PortFlagName, Usage: "server listening port", Value: 3100, EnvVars: prefixEnvVars("PORT"), } )
View Source
var (
ErrNotFound = errors.New("not found")
)
View Source
var Flags []cli.Flag
Flags contains the list of configuration options available to the binary.
View Source
var MaxAllowedBlobSize = uint64(MaxSRSPoints * BytesPerSymbol / MaxCodingRatio)
View Source
var MaxSRSPoints = math.Pow(2, 28)
Functions ¶
func CheckRequired ¶
func CheckRequired(ctx *cli.Context) error
func LoadStoreRouter ¶ added in v1.3.0
func ReadCommitmentMode ¶ added in v1.2.0
func ReadCommitmentMode(r *http.Request) (commitments.CommitmentMode, error)
func WithLogging ¶
func WithLogging(handleFn func(http.ResponseWriter, *http.Request) error, log log.Logger) func(http.ResponseWriter, *http.Request)
WithLogging is a middleware that logs the request method and URL.
func WithMetrics ¶
func WithMetrics(handleFn func(http.ResponseWriter, *http.Request) error, m metrics.Metricer) func(http.ResponseWriter, *http.Request) error
WithMetrics is a middleware that records metrics for the route path.
Types ¶
type CLIConfig ¶
type CLIConfig struct { S3Config store.S3Config EigenDAConfig Config MetricsCfg opmetrics.CLIConfig }
func ReadCLIConfig ¶
func ReadCLIConfig(ctx *cli.Context) CLIConfig
type Config ¶ added in v1.2.0
type Config struct { S3Config store.S3Config ClientConfig clients.EigenDAClientConfig // The blob encoding version to use when writing blobs from the high level interface. PutBlobEncodingVersion codecs.BlobEncodingVersion // ETH vars EthRPC string SvcManagerAddr string EthConfirmationDepth int64 // KZG vars CacheDir string G1Path string G2Path string MaxBlobLength string G2PowerOfTauPath string // Memstore Config params MemstoreEnabled bool MemstoreBlobExpiration time.Duration // contains filtered or unexported fields }
func ReadConfig ¶ added in v1.2.0
func ReadConfig(ctx *cli.Context) Config
NewConfig parses the Config from the provided flags or environment variables.
func (*Config) Check ¶ added in v1.2.0
Check ... verifies that configuration values are adequately set
func (*Config) GetMaxBlobLength ¶ added in v1.2.0
func (*Config) VerificationCfg ¶ added in v1.2.0
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) GetMemStats ¶ added in v1.3.0
func (*Server) GetS3Stats ¶ added in v1.3.0
func (*Server) WriteBadRequest ¶
func (svr *Server) WriteBadRequest(w http.ResponseWriter, msg string)
func (*Server) WriteInternalError ¶
func (svr *Server) WriteInternalError(w http.ResponseWriter, err error)
func (*Server) WriteNotFound ¶
func (svr *Server) WriteNotFound(w http.ResponseWriter, msg string)
func (*Server) WriteResponse ¶
func (svr *Server) WriteResponse(w http.ResponseWriter, data []byte)
Click to show internal directories.
Click to hide internal directories.