LeKovr / webtail

Tail logfile via websocket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webtail

Tail [log]files via websocket

English | Pусский | 日本語


Go Reference GitHub Release Build Status GitHub license

Go Coverage Test Coverage Maintainability GoCard

webtail is a web-service and golang package used for continious updated files publication via websocker to browser.

Ping stream sample

Install

go get -v github.com/LeKovr/webtail/...

Download binary

See Latest release

Docker

Starting from 0.43.2 docker images are published at GitHub Packages, so use

docker pull ghcr.io/lekovr/webtail:latest

See docker-compose.yml for usage example.

v0.43.1 is the last version available at dockerhub.

Use package in your service

package main
import (
    "github.com/LeKovr/webtail"
)

func main() {
    wt, err := webtail.New(log, cfg)
    if err != nil {
        return
    }
    go wt.Run()
    defer wt.Close()
    // ...
    http.Handle("/tail", wt)
}

See also: app.go

Note about gorilla/websocket

Starting from v0.30 this code is based on gorilla/websocket chat example. See {client,hub}.go

License

The MIT License (MIT), see LICENSE.

Copyright (c) 2016-2023 Aleksey Kovrizhkin lekovr+webtail@gmail.com

About

Tail logfile via websocket

License:MIT License


Languages

Language:Go 63.4%Language:JavaScript 17.6%Language:Makefile 12.8%Language:HTML 3.0%Language:CSS 1.8%Language:Dockerfile 1.4%