Documentation ¶
Index ¶
Constants ¶
const DefaultRegistryFilename = "registry.json"
DefaultRegistryFilename is the default registry filename
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONRegistry ¶
type JSONRegistry struct { Version int Registry map[string]RegistryEntry }
JSONRegistry represents the registry that will be written on disk
type NullAuditor ¶
type NullAuditor struct {
// contains filtered or unexported fields
}
NullAuditor is an auditor not doing anything with the message it received. It has been introduced for the Serverless Agent which doesn't need to maintain a registry.
func NewNullAuditor ¶
func NewNullAuditor() *NullAuditor
NewNullAuditor returns an instanciated NullAuditor. `Start()` is the next method that should be used on this NullAuditor.
func (*NullAuditor) Channel ¶
func (a *NullAuditor) Channel() chan *message.Message
Channel returns the channel on which should be sent the messages.
func (*NullAuditor) GetOffset ¶
func (a *NullAuditor) GetOffset(identifier string) string
GetOffset returns an empty string.
func (*NullAuditor) GetTailingMode ¶
func (a *NullAuditor) GetTailingMode(identifier string) string
GetTailingMode returns an empty string.
type Registry ¶
type Registry interface { GetOffset(identifier string) string GetTailingMode(identifier string) string }
Registry holds a list of offsets.
type RegistryAuditor ¶
type RegistryAuditor struct {
// contains filtered or unexported fields
}
A RegistryAuditor is storing the Auditor information using a registry.
func New ¶
func New(runPath string, filename string, ttl time.Duration) *RegistryAuditor
New returns an initialized Auditor
func (*RegistryAuditor) Channel ¶
func (a *RegistryAuditor) Channel() chan *message.Message
Channel returns the channel to use to communicate with the auditor or nil if the auditor is currently stopped.
func (*RegistryAuditor) GetOffset ¶
func (a *RegistryAuditor) GetOffset(identifier string) string
GetOffset returns the last committed offset for a given identifier, returns an empty string if it does not exist.
func (*RegistryAuditor) GetTailingMode ¶
func (a *RegistryAuditor) GetTailingMode(identifier string) string
GetTailingMode returns the last committed offset for a given identifier, returns an empty string if it does not exist.