api

package
v0.0.54 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.0.14

type Config struct {
	EdgeCacheConfig EdgeCacheConfig `yaml:"edge_cache" default:"{}"`
}

func (*Config) Validate added in v0.0.14

func (c *Config) Validate() error

type EdgeCacheConfig added in v0.0.14

type EdgeCacheConfig struct {
	Enabled bool `yaml:"enabled" default:"true"`

	FrameTTL human.Duration `yaml:"frame_ttl" default:"1440m"`
}

func (*EdgeCacheConfig) Validate added in v0.0.14

func (c *EdgeCacheConfig) Validate() error

type HTTP

type HTTP struct {
	// contains filtered or unexported fields
}

func NewHTTP

func NewHTTP(log logrus.FieldLogger, svc *service.ForkChoice, config *Config, opts *Options) (*HTTP, error)

func (*HTTP) BindToRouter

func (h *HTTP) BindToRouter(_ context.Context, router *httprouter.Router) error

type Options

type Options struct {
	MetricsEnabled bool
}

func DefaultOptions

func DefaultOptions() *Options

func (*Options) SetMetricsEnabled

func (o *Options) SetMetricsEnabled(enabled bool) *Options

func (*Options) Validate

func (o *Options) Validate() error

func (*Options) WithMetricsDisabled

func (o *Options) WithMetricsDisabled() *Options

func (*Options) WithMetricsEnabled

func (o *Options) WithMetricsEnabled() *Options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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