Version: v0.0.0-...-88424db Latest Latest

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

Go to latest
Published: Mar 11, 2015 License: Apache-2.0 Imports: 20 Imported by: 0



Package thread contains code for interacting with a single stenotype thread.



This section is empty.


This section is empty.


This section is empty.


type Thread

type Thread struct {
	// contains filtered or unexported fields

Thread watches the environment of a single stenotype thread. Stenotype runs multiple threads, each of which interacts with a specific set of directories in the environment. Each stenotype thread has a corresponding Thread object server-side which watches for file changes, cleans up old/dead files, etc.

func Threads

func Threads(configs []config.ThreadConfig, baseDir string) ([]*Thread, error)

Threads creates a set of thread objects based on a set of ThreadConfigs.

func (*Thread) ExportDebugHandlers

func (t *Thread) ExportDebugHandlers(mux *http.ServeMux)

ExportDebugHandlers exports a set of HTTP handlers on /debug/t<thread id> for querying internal state from this thread.

func (*Thread) FileLastSeen

func (t *Thread) FileLastSeen() time.Time

func (*Thread) Lookup

func (t *Thread) Lookup(ctx context.Context, q query.Query) *base.PacketChan

Lookup looks up packets that match a given query within the files owned by a single stenotype thread.

func (*Thread) SyncFiles

func (t *Thread) SyncFiles()

SyncFiles checks the disk to see if stenotype has created any new files, or if old files should be deleted.

Source Files

Jump to

Keyboard shortcuts

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