mirror of
https://github.com/minio/minio.git
synced 2025-11-28 05:04:14 -05:00
New Admin Info (#8497)
This commit is contained in:
committed by
kannappanr
parent
8b803491af
commit
24fb1bf258
@@ -24,6 +24,7 @@ import (
|
||||
// Target - event target interface
|
||||
type Target interface {
|
||||
ID() TargetID
|
||||
IsActive() (bool, error)
|
||||
Save(Event) error
|
||||
Send(string) error
|
||||
Close() error
|
||||
@@ -130,6 +131,13 @@ func (list *TargetList) List() []TargetID {
|
||||
return keys
|
||||
}
|
||||
|
||||
// TargetMap - returns available targets.
|
||||
func (list *TargetList) TargetMap() map[TargetID]Target {
|
||||
list.RLock()
|
||||
defer list.RUnlock()
|
||||
return list.targets
|
||||
}
|
||||
|
||||
// Send - sends events to targets identified by target IDs.
|
||||
func (list *TargetList) Send(event Event, targetIDs ...TargetID) <-chan TargetIDErr {
|
||||
errCh := make(chan TargetIDErr)
|
||||
|
||||
Reference in New Issue
Block a user