-
Notifications
You must be signed in to change notification settings - Fork 65
clean up dependencies of sdk.go #635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -140,6 +141,73 @@ func (p *ManagementServiceProvider) managementService(aNew bool, opts ...Service | |||
return ms, nil | |||
} | |||
|
|||
func (p *ManagementServiceProvider) normalize(opt *ServiceOptions) (*ServiceOptions, error) { | |||
// lookup configurations | |||
configs, err := p.tmsProvider.Configs() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's better to create another struct that implements the normaliser interface and pass the slice of normalisers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
token/sdk/sdk.go
Outdated
@@ -205,9 +179,18 @@ func (p *SDK) Start(ctx context.Context) error { | |||
logger.Infof("start token management service [%s]...", tmsID) | |||
|
|||
// connect network | |||
if err := p.postInitializer.ConnectNetwork(tmsID.Network, tmsID.Channel, tmsID.Namespace); err != nil { | |||
net := network.GetInstance(p.registry, tmsID.Network, tmsID.Channel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are in the sdk and we have access to the network provider, the tms provider etc, maybe we could use those instead of calling the registry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
New(tmsID token3.TMSID) (F, error) | ||
} | ||
|
||
type AcceptTxInDBFilterProvider struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a comment to describe more or less what this filter is used for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
No description provided.