WIP: internal API

This commit is contained in:
Ingo Oppermann
2023-04-17 14:01:20 +02:00
parent 7643959bf8
commit 27f19f9188
9 changed files with 374 additions and 45 deletions

View File

@@ -623,17 +623,20 @@ func (a *api) start() error {
a.restream = restream
if cfg.Cluster.Enable {
if cluster, err := cluster.New(cluster.ClusterConfig{
cluster, err := cluster.New(cluster.ClusterConfig{
ID: cfg.ID,
Name: cfg.Name,
Path: filepath.Join(cfg.DB.Dir, "cluster"),
IPLimiter: a.sessionsLimiter,
Logger: a.log.logger.core.WithComponent("Cluster"),
}); err != nil {
Bootstrap: cfg.Cluster.Bootstrap,
Address: cfg.Cluster.Address,
})
if err != nil {
return fmt.Errorf("unable to create cluster: %w", err)
} else {
a.cluster = cluster
}
a.cluster = cluster
}
var httpjwt jwt.JWT