publish

package
v0.0.0-...-2326054 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const TugbotTimeFieldName = "tugbot-time"

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonPublisher

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

func NewJsonPublisher

func NewJsonPublisher(esClient *elasticclient.ESClient) *JsonPublisher

func (*JsonPublisher) Publish

func (jp *JsonPublisher) Publish(reader io.ReadCloser, indexNameSuffix string) (*string, error)

type PublishHandler

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

func NewPublishHandler

func NewPublishHandler(esUrl string) *PublishHandler

NewUploadHandler creates UploadHandler instance

func (PublishHandler) Handle

func (ph PublishHandler) Handle(writer http.ResponseWriter, request *http.Request)

func (PublishHandler) HandleEvent

func (ph PublishHandler) HandleEvent(writer http.ResponseWriter, request *http.Request)

type Publisher

type Publisher interface {
	Publish(fileReader io.ReadCloser) (*string, error)
}

Publisher interface

type TarPublisher

type TarPublisher struct {
}

TarPublisher implements the Uploader interface

func (TarPublisher) Publish

func (zu TarPublisher) Publish(fileReader io.ReadCloser) (*string, error)

Publish extracts the given tar file and stores it to a new generated folder in the current directory. The return value is the directory name

Jump to

Keyboard shortcuts

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