glumelogger

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

README

ThriftSource FlumeLogger for Go

Usage

GoDoc

Install with

go get -u github.com/ceocoder/glumelogger

License

see LICENSE.txt

Documentation

Overview

Package glumelogger provides support for Flume NG in Go

It communicates to a Flume NG agent in Thrift via TFramedTranport with TCompactProtocol thrift bindings are taken from Flume 1.7[1] (however they should be compatible with 1.6, 1.5, 1.4)

[1] https://raw.githubusercontent.com/apache/flume/flume-1.7/flume-ng-sdk/src/main/thrift/flume.thrift

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlumeLogger

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

GlumeLogger holds thrift client and headers use NewGlumeLogger to create new one

func NewGlumeLogger

func NewGlumeLogger(host string, port int, headers *map[string]string) *GlumeLogger

NewGlumeLogger create a new GlumeLogger client, it requires a host, port and map of headers

func (*GlumeLogger) Log

func (l *GlumeLogger) Log(body []byte) (flume.Status, error)

Log forwards message to be logged as array of bytes returns status of write and error

append operation is wrapped in a mutex making it thread-safe.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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