business

package
v0.0.0-...-b7e0597 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

This package implements the Dump logger.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

This package implements the shell's wrapper.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEvent

type LogEvent struct {
	Timestamp string `json:"@timestamp"`
	Command   string `json:"command"`
	Output    string `json:"output,omitempty"`
}

LogEvent: this struct represent a single entry into the JSON log file.

type Sentinel

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

func New

func New(opts ...SentinelOption) *Sentinel

func (*Sentinel) Start

func (w *Sentinel) Start()

Start: it starts a shell, getting the stdin from that,

then it write every byte from the stdin to a multiwriter,
the latter includes the os.Stdout (to make the shell functioning for the user)
and the Sentinel itself, for auditing purpose.

func (*Sentinel) Write

func (w *Sentinel) Write(p []byte) (n int, err error)

Write: this func splits the given array of bytes into line of text,

then it writes every line of text to every defined logger.

type SentinelOption

type SentinelOption func(*Sentinel)

func WithDumpLogger

func WithDumpLogger(enabled bool, filename string) SentinelOption

func WithJsonLogger

func WithJsonLogger(enabled bool, filename string) SentinelOption

Jump to

Keyboard shortcuts

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