sentry

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 7 Imported by: 0

README

sentry

Go Reference Go Report Card

Stream logs through websockets, written in Go.

Usage

Server
package main

import (
    "github.com/pravinba9495/sentry"
)

func main() {

    // Initialize sentry options 
    opts := &sentry.SentryOptions{
	Port:        8080,
	Secret:      "SOME_RANDOM_SECRET",
	LogFilePath: "logfile.txt",
    }

    // Create and start the sentry instance
    instance := sentry.NewInstance(opts)
    err := <-instance.Run()
    
    log.Println(err)
}

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SentryInstance added in v0.0.2

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

SentryInstance defines the model for a sentry instance

func NewInstance added in v0.0.2

func NewInstance(opts *SentryOptions) *SentryInstance

NewInstance returns a new sentry instance

func (*SentryInstance) Run added in v0.0.2

func (instance *SentryInstance) Run() chan error

Run starts a sentry instance

type SentryOptions

type SentryOptions struct {
	Port        int
	Secret      string
	LogFilePath string
}

SentryOptions defines the parameters for running a sentry instance

Jump to

Keyboard shortcuts

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