Documentation ¶
Overview ¶
Package fill acts as a sub-command, reading inotify events and forwarding them to the boldb backing the assemble server.
By default, the fill command is designed to listen for only open, close and delete events tying it to the Linux subsystem.
Whilst Windows/Mac can generate similar events, these are not handled by the `tiyo fill` application and as a result, this section of the application is not designed for those platforms.
Index ¶
Constants ¶
const MAXCLIENTS int = 100
MAXCLIENTS : The maximum number of http clients created by fill application
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fill ¶
type Fill struct { // The filler object managed by this instance of the fill command Filler *Filler // Configuration of the fill command Config *config.Config // The pipeline being handled by this command Pipeline *pipeline.Pipeline // The name of the pipeline to load Name string // Command flags Flags *flag.FlagSet }
Fill : Primary structure of the fill command
type FilledFileEvent ¶
type FilledFileEvent struct { // The name of the file being actioned Filename string // The bucket to write into Bucket string // Is this a file open event Opened bool // Is this a file close event Closed bool // Is this a file deleted event Deleted bool // the configuration object for the fill command // Can be a reduced config containing only assemble and // the sequence base directory Config *config.Config }
FilledFileEvent : A file event to be sent to AssembleServer
func NewFillEvent ¶
func NewFillEvent(config *config.Config, bucket string, filename string) *FilledFileEvent
NewFillEvent : Create a new fill event stream
func (*FilledFileEvent) Delete ¶
func (event *FilledFileEvent) Delete()
Delete : Deletes an item from the boltdb - triggered on file deleted
func (*FilledFileEvent) JSONBody ¶
func (event *FilledFileEvent) JSONBody(bucket string, key string) []byte
JSONBody : Construct the JSON object to send as part of the request
func (*FilledFileEvent) State ¶
func (event *FilledFileEvent) State(notification notify.Event) *FilledFileEvent
State : Set the state of the event based on the inotify event
Only monitoring:
- InOpen
- InCloseWrite
- Remove
func (*FilledFileEvent) Store ¶
func (event *FilledFileEvent) Store()
Store : Store the event in the BoltDB
type Filler ¶
type Filler struct { // A map of paths and events to watch Paths map[string]*FilledFileEvent // Configuration item for the fill command Config *config.Config }
Filler : Struct for managing multiple event paths