emitter

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package emitter defines rotation event notification

Index

Constants

View Source
const (
	//DestPath dest path
	DestPath = "$DestPath"
	//Dest dest location
	Dest = "$Dest"
	//DestName dest simple name
	DestName = "$DestName"
	//TimePath stream create time based path fragment
	TimePath = "$TimePath"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Config  *config.Event
	Created time.Time
	URL     string
	// contains filtered or unexported fields
}

Event represents an event

func (*Event) SetNextRun

func (e *Event) SetNextRun(now time.Time)

SetNextRun set next run

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service represents emitter service

func New

func New(stream *config.Stream) (*Service, error)

New creates new service

func (*Service) Close

func (s *Service) Close() error

Close closes service

func (*Service) Emit

func (s *Service) Emit(event *Event) error

Emit emits an event

func (*Service) Schedule

func (s *Service) Schedule(event *Event) error

Schedule schedules an event

Directories

Path Synopsis
Package consumer defines log rotation streamer CLI consumer
Package consumer defines log rotation streamer CLI consumer
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL