2015-11-01 16:35:01 +01:00
|
|
|
package provider
|
|
|
|
|
2015-11-13 11:50:32 +01:00
|
|
|
import (
|
2016-04-13 20:36:23 +02:00
|
|
|
"github.com/containous/traefik/safe"
|
2016-02-24 16:43:39 +01:00
|
|
|
"github.com/containous/traefik/types"
|
2015-11-13 11:50:32 +01:00
|
|
|
"github.com/docker/libkv/store"
|
|
|
|
"github.com/docker/libkv/store/boltdb"
|
|
|
|
)
|
2015-10-01 12:04:25 +02:00
|
|
|
|
2015-11-01 19:29:47 +01:00
|
|
|
// BoltDb holds configurations of the BoltDb provider.
|
2015-11-02 19:48:34 +01:00
|
|
|
type BoltDb struct {
|
2016-05-24 17:31:50 +02:00
|
|
|
Kv
|
2015-10-01 12:04:25 +02:00
|
|
|
}
|
|
|
|
|
2015-11-01 19:29:47 +01:00
|
|
|
// Provide allows the provider to provide configurations to traefik
|
|
|
|
// using the given configuration channel.
|
2016-05-31 09:54:42 +02:00
|
|
|
func (provider *BoltDb) Provide(configurationChan chan<- types.ConfigMessage, pool *safe.Pool, constraints []types.Constraint) error {
|
2016-01-13 22:46:44 +01:00
|
|
|
provider.storeType = store.BOLTDB
|
2015-11-13 11:50:32 +01:00
|
|
|
boltdb.Register()
|
2016-05-30 15:05:58 +02:00
|
|
|
return provider.provide(configurationChan, pool, constraints)
|
2015-10-01 12:04:25 +02:00
|
|
|
}
|