Skip to content
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

provide sync method in RoleService instead #4

Open
WindzCUHK opened this issue Dec 19, 2022 · 0 comments
Open

provide sync method in RoleService instead #4

WindzCUHK opened this issue Dec 19, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@WindzCUHK
Copy link
Contributor

// RoleService represents an interface to automatically refresh the role token, and a role token provider function pointer.
type RoleService interface {
StartRoleUpdater(context.Context) <-chan error
RefreshRoleTokenCache(ctx context.Context) <-chan error
GetRoleProvider() RoleProvider
}

follow the interface in authorizer
https://github.com/AthenZ/athenz-authorizer/blob/78de9daaa7d5c15f191af8f6af5eb915bcb04035/policy/daemon.go#L39-L46

Suggestion:

type RoleService interface {
	Start(context.Context) <-chan error
	Update(context.Context) error
	GetRoleProvider() RoleProvider
}

migrated from: yahoojapan/athenz-client-sidecar#20

@WindzCUHK WindzCUHK added enhancement New feature or request help wanted Extra attention is needed labels Dec 19, 2022
@WindzCUHK WindzCUHK changed the title Provide sync method in RoleService instead provide sync method in RoleService instead Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant