Documentation
¶
Index ¶
- Constants
- type AclManager
- func (a *AclManager) Close() error
- func (a *AclManager) CurrentFunction(ctx context.Context) (int, error)
- func (a *AclManager) Loop(ctx context.Context) error
- func (a *AclManager) Primary(ctx context.Context) (*AclManager, error)
- func (a *AclManager) SyncAcls(ctx context.Context, primary *AclManager) ([]string, []string, error)
Constants ¶
View Source
const ( Primary = iota Follower Unknown )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AclManager ¶
type AclManager struct { Addr string Username string Password string RedisClient *redis.Client // contains filtered or unexported fields }
AclManager contains the struct for managing the state of ACLs
func New ¶
func New(addr string, username string, password string, aclfile bool) *AclManager
New creates a new AclManager
func (*AclManager) CurrentFunction ¶
func (a *AclManager) CurrentFunction(ctx context.Context) (int, error)
CurrentFunction checks if the current node is the Primary node
func (*AclManager) Loop ¶
func (a *AclManager) Loop(ctx context.Context) error
Loop loops through the sync interval and syncs the acls
func (*AclManager) Primary ¶ added in v0.0.2
func (a *AclManager) Primary(ctx context.Context) (*AclManager, error)
func (*AclManager) SyncAcls ¶
func (a *AclManager) SyncAcls(ctx context.Context, primary *AclManager) ([]string, []string, error)
SyncAcls connects to master node and syncs the acls to the current node
Click to show internal directories.
Click to hide internal directories.