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
Click to show internal directories.
Click to hide internal directories.