Documentation ¶
Index ¶
- func SetViperDefaults()
- type Config
- type ConfigOption
- type DB
- type EAD
- type ElasticSearch
- func (e *ElasticSearch) AddOptions(cfg *Config) error
- func (e *ElasticSearch) CreateDefaultMappings(es *elasticsearch.Client, withAlias bool, withReset bool) ([]string, error)
- func (e *ElasticSearch) IndexService(l *logger.CustomLogger, ncfg *index.NatsConfig) (*index.Service, error)
- func (e *ElasticSearch) NewBulkIndexer(es *elasticsearch.Client) (esutil.BulkIndexer, error)
- func (e *ElasticSearch) NewClient(l *logger.CustomLogger) (*elasticsearch.Client, error)
- func (e *ElasticSearch) ResetAll(w http.ResponseWriter, r *http.Request)
- type HTTP
- type ImageProxy
- type Logging
- type Nats
- type TimeRevisionStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetViperDefaults ¶
func SetViperDefaults()
Types ¶
type Config ¶
type Config struct { // default orgID when none is given OrgID string `json:"orgID"` ElasticSearch `json:"elasticSearch"` HTTP `json:"http"` TimeRevisionStore `json:"timeRevisionStore"` Logging `json:"logging"` Nats `json:"nats"` EAD `json:"ead"` DB `json:"db"` ImageProxy `json:"imageProxy"` // contains filtered or unexported fields }
type ConfigOption ¶
type DB ¶
type DB struct { // supported types are "sqlite3" "postgres" Type string // go sql compatible connection string, e.g. "/tmp/test.db" for sqlit3 or // "host=myhost port=myport user=hub3 dbname=hub3 password=mypassword" Connect string // contains filtered or unexported fields }
func (*DB) AddOptions ¶
type EAD ¶
func (*EAD) AddOptions ¶
type ElasticSearch ¶
type ElasticSearch struct { // enable elasticsearch client Enabled bool // urls to connect to elasticsearch cluster Urls []string // enable elasticsearch caching proxy Proxy bool // number of elasticsearch workers. default: 1 Workers int // maxRetries number of client retries. default: 5 MaxRetries int // clientTimeOut seconds for the client to time out. default 10 ClientTimeOut int // gather elasticsearch metrics Metrics bool // base of the index aliases IndexName string // number of shards. default 1 Shards int // number of replicas. default 0 Replicas int // UseRemoteIndexer is true when a separate process reads of the queue UseRemoteIndexer bool // IndexTypes options are v1, v2, fragment IndexTypes []string // use FastHTTP transport for communication with the ElasticSearch cluster FastHTTP bool // contains filtered or unexported fields }
func (*ElasticSearch) AddOptions ¶
func (e *ElasticSearch) AddOptions(cfg *Config) error
func (*ElasticSearch) CreateDefaultMappings ¶
func (e *ElasticSearch) CreateDefaultMappings(es *elasticsearch.Client, withAlias bool, withReset bool) ([]string, error)
func (*ElasticSearch) IndexService ¶
func (e *ElasticSearch) IndexService(l *logger.CustomLogger, ncfg *index.NatsConfig) (*index.Service, error)
func (*ElasticSearch) NewBulkIndexer ¶
func (e *ElasticSearch) NewBulkIndexer(es *elasticsearch.Client) (esutil.BulkIndexer, error)
func (*ElasticSearch) NewClient ¶
func (e *ElasticSearch) NewClient(l *logger.CustomLogger) (*elasticsearch.Client, error)
func (*ElasticSearch) ResetAll ¶
func (e *ElasticSearch) ResetAll(w http.ResponseWriter, r *http.Request)
type HTTP ¶
type HTTP struct { Port int `json:"port" mapstructure:"port"` MetricsPort int `json:"metricsPort"` CertFile string `json:"certFile"` KeyFile string `json:"keyFile"` }
func (*HTTP) AddOptions ¶
type ImageProxy ¶
func (*ImageProxy) AddOptions ¶
func (ip *ImageProxy) AddOptions(cfg *Config) error
type Logging ¶
type Logging struct { DevMode bool `json:"devmode"` Level string `json:"level"` WithCaller bool `json:"withCaller"` ConsoleLogger bool `json:"consoleLogger"` }
func (*Logging) AddOptions ¶
type Nats ¶
type Nats struct { Enabled bool `json:"enabled"` ClusterID string `json:"clusterID"` ClientID string `json:"clientID"` DurableName string `json:"durableName"` DurableQueue string `json:"durableQueue"` URL string `json:"url"` // contains filtered or unexported fields }
Nats are configuration options to access NATS streaming server
func (*Nats) AddOptions ¶
type TimeRevisionStore ¶
func (*TimeRevisionStore) AddOptions ¶
func (trs *TimeRevisionStore) AddOptions(cfg *Config) error
Click to show internal directories.
Click to hide internal directories.