kittenclient

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MIT Imports: 7 Imported by: 0

README

Kittenclient-go

Build Status Go Report Card PkgGoDev

Kittenclient is a client to kittenhouse written in go. He makes requests to kittenhouse easier.

Example Usage

package main

import "github.com/EpicStep/kittenclient-go"

func main() {
	config := kittenclient.ClientConfig{
		Addr: "localhost:13338",
		UDP:  false,
	}

	klogger := kittenclient.NewLogger(&config)

	err := klogger.Log("internal_logs_buffer(time,server,port)", "('2020-11-20 14:40:00','%s', 8080)", "myfavoriteserver")
	if err != nil {
		panic(err)
	}
}

Features

Client support:

  • HTTP transport
  • UDP transport

TODO

  • RowBinary support

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a KittenHouse client.

func NewLogger

func NewLogger(config *ClientConfig) *Client

NewLogger returning logging client.

func (*Client) Log

func (client *Client) Log(table string, format string, v ...interface{}) error

Log is a function to log something to KittenHouse.

type ClientConfig

type ClientConfig struct {
	// Address of kittenhouse
	Addr string
	// UDP transport instead TCP
	UDP bool
}

ClientConfig save config to kittenhouse connections.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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