replace passing parameters by context with singletons

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2021-03-11 11:43:40 +01:00
parent 9301c298ef
commit 48402585fd
No known key found for this signature in database
GPG key ID: 9858809D6F8F6E7E
47 changed files with 169 additions and 205 deletions

View file

@ -37,7 +37,7 @@ func (cp *contextsProxy) SetCurrent(ctx context.Context, request *contextsv1.Set
}
func (cp *contextsProxy) List(ctx context.Context, request *contextsv1.ListRequest) (*contextsv1.ListResponse, error) {
s := store.ContextStore(ctx)
s := store.Instance()
configFile, err := config.LoadFile(cp.configDir)
if err != nil {
return nil, err

View file

@ -62,7 +62,7 @@ type proxy struct {
// New creates a new proxy server
func New(ctx context.Context) Proxy {
configDir := config.Dir(ctx)
configDir := config.Dir()
return &proxy{
configDir: configDir,
streams: map[string]*streams.Stream{},