@@ -19,27 +19,27 @@ package server
1919import (
2020 "context"
2121 "github.com/functionstream/functionstream/common"
22- "github.com/functionstream/functionstream/lib /contube"
22+ "github.com/functionstream/functionstream/fs /contube"
2323 "log/slog"
2424 "os"
2525 "sync"
2626
27- "github.com/functionstream/functionstream/lib "
27+ "github.com/functionstream/functionstream/fs "
2828)
2929
30- var loadedConfig * lib .Config
30+ var loadedConfig * fs .Config
3131var initConfig = sync.Once {}
3232
33- func LoadConfigFromEnv () * lib .Config {
33+ func LoadConfigFromEnv () * fs .Config {
3434 initConfig .Do (func () {
35- loadedConfig = & lib .Config {
35+ loadedConfig = & fs .Config {
3636 ListenAddr : getEnvWithDefault ("LISTEN_ADDR" , common .DefaultAddr ),
3737 PulsarURL : getEnvWithDefault ("PULSAR_URL" , common .DefaultPulsarURL ),
3838 }
3939 queueType := getEnvWithDefault ("QUEUE_TYPE" , common .DefaultQueueType )
4040 switch queueType {
4141 case common .PulsarQueueType :
42- loadedConfig .QueueBuilder = func (ctx context.Context , c * lib .Config ) (contube.TubeFactory , error ) {
42+ loadedConfig .QueueBuilder = func (ctx context.Context , c * fs .Config ) (contube.TubeFactory , error ) {
4343 return contube .NewPulsarEventQueueFactory (ctx , (& contube.PulsarTubeFactoryConfig {
4444 PulsarURL : c .PulsarURL ,
4545 }).ToConfigMap ())
@@ -49,12 +49,12 @@ func LoadConfigFromEnv() *lib.Config {
4949 return loadedConfig
5050}
5151
52- func LoadStandaloneConfigFromEnv () * lib .Config {
52+ func LoadStandaloneConfigFromEnv () * fs .Config {
5353 initConfig .Do (func () {
54- loadedConfig = & lib .Config {
54+ loadedConfig = & fs .Config {
5555 ListenAddr : getEnvWithDefault ("LISTEN_ADDR" , common .DefaultAddr ),
5656 }
57- loadedConfig .QueueBuilder = func (ctx context.Context , c * lib .Config ) (contube.TubeFactory , error ) {
57+ loadedConfig .QueueBuilder = func (ctx context.Context , c * fs .Config ) (contube.TubeFactory , error ) {
5858 return contube .NewMemoryQueueFactory (ctx ), nil
5959 }
6060 })
0 commit comments