Documentation
¶
Index ¶
- Constants
- type AclManager
- func (a *AclManager) Close() error
- func (a *AclManager) CurrentFunction(ctx context.Context) (function int, err error)
- func (a *AclManager) Loop(ctx context.Context) (err error)
- func (a *AclManager) Primary(ctx context.Context) (primary *AclManager, err error)
- func (a *AclManager) SyncAcls(ctx context.Context, primary *AclManager) (updated []string, deleted []string, err 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 containers the struct for bedel to manager the state of aclmanager acls
func New ¶
func New(addr string, username string, password string) *AclManager
New creates a new AclManager
func (*AclManager) CurrentFunction ¶
func (a *AclManager) CurrentFunction(ctx context.Context) (function int, err error)
CurrentFunction check if the current node is the Primary node
func (*AclManager) Loop ¶
func (a *AclManager) Loop(ctx context.Context) (err 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) (primary *AclManager, err error)
func (*AclManager) SyncAcls ¶
func (a *AclManager) SyncAcls(ctx context.Context, primary *AclManager) (updated []string, deleted []string, err error)
SyncAcls connects to master node and syncs the acls to the current node
Click to show internal directories.
Click to hide internal directories.