use stream pkg instead server pkg
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/cs3org/reva/v2/pkg/events"
|
"github.com/cs3org/reva/v2/pkg/events"
|
||||||
"github.com/cs3org/reva/v2/pkg/events/server"
|
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||||
"github.com/go-micro/plugins/v4/events/natsjs"
|
"github.com/go-micro/plugins/v4/events/natsjs"
|
||||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||||
ociscrypto "github.com/owncloud/ocis/v2/ocis-pkg/crypto"
|
ociscrypto "github.com/owncloud/ocis/v2/ocis-pkg/crypto"
|
||||||
@@ -63,7 +63,7 @@ func Server(cfg *config.Config) *cli.Command {
|
|||||||
RootCAs: rootCAPool,
|
RootCAs: rootCAPool,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
client, err := server.NewNatsStream(
|
client, err := stream.Nats(
|
||||||
natsjs.TLSConfig(tlsConf),
|
natsjs.TLSConfig(tlsConf),
|
||||||
natsjs.Address(evtsCfg.Endpoint),
|
natsjs.Address(evtsCfg.Endpoint),
|
||||||
natsjs.ClusterID(evtsCfg.Cluster),
|
natsjs.ClusterID(evtsCfg.Cluster),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
stdhttp "net/http"
|
stdhttp "net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/cs3org/reva/v2/pkg/events/server"
|
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||||
"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
|
"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
|
||||||
chimiddleware "github.com/go-chi/chi/v5/middleware"
|
chimiddleware "github.com/go-chi/chi/v5/middleware"
|
||||||
"github.com/go-micro/plugins/v4/events/natsjs"
|
"github.com/go-micro/plugins/v4/events/natsjs"
|
||||||
@@ -74,7 +74,7 @@ func Server(opts ...Option) (http.Service, error) {
|
|||||||
RootCAs: rootCAPool,
|
RootCAs: rootCAPool,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
publisher, err = server.NewNatsStream(
|
publisher, err = stream.Nats(
|
||||||
natsjs.TLSConfig(tlsConf),
|
natsjs.TLSConfig(tlsConf),
|
||||||
natsjs.Address(options.Config.Events.Endpoint),
|
natsjs.Address(options.Config.Events.Endpoint),
|
||||||
natsjs.ClusterID(options.Config.Events.Cluster),
|
natsjs.ClusterID(options.Config.Events.Cluster),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/cs3org/reva/v2/pkg/events"
|
"github.com/cs3org/reva/v2/pkg/events"
|
||||||
"github.com/cs3org/reva/v2/pkg/events/server"
|
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||||
"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
|
"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
|
||||||
"github.com/go-micro/plugins/v4/events/natsjs"
|
"github.com/go-micro/plugins/v4/events/natsjs"
|
||||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||||
@@ -62,7 +62,7 @@ func Server(cfg *config.Config) *cli.Command {
|
|||||||
RootCAs: rootCAPool,
|
RootCAs: rootCAPool,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
client, err := server.NewNatsStream(
|
client, err := stream.Nats(
|
||||||
natsjs.TLSConfig(tlsConf),
|
natsjs.TLSConfig(tlsConf),
|
||||||
natsjs.Address(evtsCfg.Endpoint),
|
natsjs.Address(evtsCfg.Endpoint),
|
||||||
natsjs.ClusterID(evtsCfg.Cluster),
|
natsjs.ClusterID(evtsCfg.Cluster),
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/cs3org/reva/v2/pkg/events/server"
|
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||||
"github.com/go-micro/plugins/v4/events/natsjs"
|
"github.com/go-micro/plugins/v4/events/natsjs"
|
||||||
ociscrypto "github.com/owncloud/ocis/v2/ocis-pkg/crypto"
|
ociscrypto "github.com/owncloud/ocis/v2/ocis-pkg/crypto"
|
||||||
"github.com/owncloud/ocis/v2/services/postprocessing/pkg/config"
|
"github.com/owncloud/ocis/v2/services/postprocessing/pkg/config"
|
||||||
@@ -56,7 +56,7 @@ func Server(cfg *config.Config) *cli.Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bus, err := server.NewNatsStream(
|
bus, err := stream.Nats(
|
||||||
natsjs.TLSConfig(tlsConf),
|
natsjs.TLSConfig(tlsConf),
|
||||||
natsjs.Address(evtsCfg.Endpoint),
|
natsjs.Address(evtsCfg.Endpoint),
|
||||||
natsjs.ClusterID(evtsCfg.Cluster),
|
natsjs.ClusterID(evtsCfg.Cluster),
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
ctxpkg "github.com/cs3org/reva/v2/pkg/ctx"
|
ctxpkg "github.com/cs3org/reva/v2/pkg/ctx"
|
||||||
revactx "github.com/cs3org/reva/v2/pkg/ctx"
|
revactx "github.com/cs3org/reva/v2/pkg/ctx"
|
||||||
"github.com/cs3org/reva/v2/pkg/errtypes"
|
"github.com/cs3org/reva/v2/pkg/errtypes"
|
||||||
"github.com/cs3org/reva/v2/pkg/events/server"
|
"github.com/cs3org/reva/v2/pkg/events/stream"
|
||||||
"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
|
"github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool"
|
||||||
"github.com/go-micro/plugins/v4/events/natsjs"
|
"github.com/go-micro/plugins/v4/events/natsjs"
|
||||||
"github.com/jellydator/ttlcache/v2"
|
"github.com/jellydator/ttlcache/v2"
|
||||||
@@ -98,7 +98,7 @@ func NewHandler(opts ...Option) (searchsvc.SearchProviderHandler, func(), error)
|
|||||||
RootCAs: rootCAPool,
|
RootCAs: rootCAPool,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bus, err := server.NewNatsStream(
|
bus, err := stream.Nats(
|
||||||
natsjs.TLSConfig(tlsConf),
|
natsjs.TLSConfig(tlsConf),
|
||||||
natsjs.Address(cfg.Events.Endpoint),
|
natsjs.Address(cfg.Events.Endpoint),
|
||||||
natsjs.ClusterID(cfg.Events.Cluster),
|
natsjs.ClusterID(cfg.Events.Cluster),
|
||||||
|
|||||||
Reference in New Issue
Block a user