Skip to content

provide sync method in RoleService instead #4

@WindzCUHK

Description

@WindzCUHK

// 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions