Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDatabase ¶
Types ¶
type AuthTransport ¶
type AuthTransport struct {
Username, Password string
// contains filtered or unexported fields
}
func (*AuthTransport) SetTransport ¶
func (l *AuthTransport) SetTransport(rt http.RoundTripper)
func (*AuthTransport) Transport ¶
func (rt *AuthTransport) Transport() http.RoundTripper
type Config ¶
type Config struct { URL string `env:"COUCHDB_URL" envDefault:"http://couchdb:5984/"` User string `env:"COUCHDB_USER" envDefault:"admin"` Password string `env:"COUCHDB_PASSWORD" envDefault:"secret"` Database string `env:"COUCHDB_DB" envDefault:"test"` DatabaseAutoCreate bool `env:"COUCHDB_DB_AUTO_CREATE" envDefault:"true"` HealthCheckKey string `env:"COUCHDB_HEALTH_CHECK_KEY" envDefault:"$health_check"` HealthCheckResultTTL time.Duration `env:"COUCHDB_HEALTH_CHECK_RESULT_TTL" envDefault:"10s"` }
func ParseConfig ¶
type HealthCheck ¶
type HealthCheck struct { Name string Client *kivik.Client DB *kivik.DB Config *Config // contains filtered or unexported fields }
HealthCheck checks the state of the object storage client. It must not be changed after it was registered as a health check.
func (*HealthCheck) HealthCheck ¶
func (h *HealthCheck) HealthCheck(ctx context.Context) servicehealthcheck.HealthCheckResult
HealthCheck checks if the object storage client is healthy. If the last result is outdated, object storage is checked for upload and download, otherwise returns the old result
Click to show internal directories.
Click to hide internal directories.