file

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: BSD-3-Clause Imports: 11 Imported by: 0

README

file adaptor

The file adaptor reads/writes data to the defined locations.

NOTE

This adaptor is primarily used for testing purposes.

Configuration:
- stdout:
    type: file
    uri: stdout://

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// URI pointing to the resource.  We only recognize file:// and stdout:// currently
	URI string `json:"uri" doc:"the uri to connect to, ie stdout://, file:///tmp/output"`
}

Config is used to configure the File Adaptor

type File

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

File is an adaptor that can be used as a source / sink for file's on disk, as well as a sink to stdout.

func (*File) Description

func (f *File) Description() string

Description for file adaptor

func (*File) Listen

func (f *File) Listen() error

Listen starts the listen loop

func (*File) SampleConfig

func (f *File) SampleConfig() string

SampleConfig for file adaptor

func (*File) Start

func (f *File) Start() (err error)

Start the file adaptor TODO: we only know how to listen on stdout for now

func (*File) Stop

func (f *File) Stop() error

Stop the adaptor

Jump to

Keyboard shortcuts

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