Documentation ¶
Index ¶
- func InitPolicyClient(lc fx.Lifecycle, policyClient *Client)
- type Client
- func (a *Client) GetAllowChangingUsernamesAndPasswords() bool
- func (a *Client) GetAllowRedTeamLaunchingServiceTestsManually() bool
- func (a *Client) GetAllowUnauthenticatedUsers() bool
- func (a *Client) GetPolicy() *policy.Policy
- func (a *Client) GetShowAddresses() bool
- func (a *Client) GetShowPoints() bool
- func (a *Client) Notify()
- func (a *Client) PolicyClient()
- func (a *Client) Publish()
- func (a *Client) RefreshLocalPolicy()
- func (a *Client) Subscribe() (uuid.UUID, <-chan struct{})
- func (a *Client) Unsubscribe(uid uuid.UUID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitPolicyClient ¶ added in v0.3.8
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client Policy allows for eventually consistent way to distribute pkg/Policy struct throughout ScoreTrak instances. This is needed because certain API routes evaluate Policy on every call, and retrieving Policy from database is very expensive, hence having eventually consistent copy is much more efficient.
func NewPolicyClient ¶
func NewPolicyClient(policy *policy.Policy, cnf queueing.MasterConfig, repo policyrepo.Repo, pubsub queue.MasterStreamPubSub) *Client
func (*Client) GetAllowChangingUsernamesAndPasswords ¶
func (*Client) GetAllowRedTeamLaunchingServiceTestsManually ¶
func (*Client) GetAllowUnauthenticatedUsers ¶
func (*Client) GetShowAddresses ¶
func (*Client) GetShowPoints ¶
func (*Client) PolicyClient ¶
func (a *Client) PolicyClient()
func (*Client) RefreshLocalPolicy ¶
func (a *Client) RefreshLocalPolicy()
func (*Client) Unsubscribe ¶
Click to show internal directories.
Click to hide internal directories.