github.com/ThomasObenaus/nomad@v0.11.1/command/agent/event/event.go (about)

     1  package event
     2  
     3  import (
     4  	"context"
     5  )
     6  
     7  // Auditor describes the interface that must be implemented by an eventer.
     8  type Auditor interface {
     9  	// Emit an event to the auditor
    10  	Event(ctx context.Context, eventType string, payload interface{}) error
    11  
    12  	// Specifies if the auditor is enabled or not
    13  	Enabled() bool
    14  
    15  	// Reopen signals to auditor to reopen any files they have open.
    16  	Reopen() error
    17  
    18  	// SetEnabled sets the auditor to enabled or disabled.
    19  	SetEnabled(enabled bool)
    20  
    21  	// DeliveryEnforced returns whether or not delivery of an audit
    22  	// log must be enforced
    23  	DeliveryEnforced() bool
    24  }