serviceLogs

package
v1.0.54 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BUILD       = "BUILD"
	RUNTIME     = "RUNTIME"
	RESPONSE    = "RESPONSE"
	STREAM      = "STREAM"
	APPLICATION = "APPLICATION"
	WEBSERVER   = "WEBSERVER"
	FULL        = "FULL"
	SHORT       = "SHORT"
	JSON        = "JSON"
	JSONSTREAM  = "JSONSTREAM"
	AT          = "@"
	HTTPS       = "https://"
	WSS         = "wss://"
	RFC5424     = "5424"
	RFC3164     = "3164"
)

Variables

View Source
var DefaultLevels = Levels{
	{"EMERGENCY", "0"},
	{"ALERT", "1"},
	{"CRITICAL", "2"},
	{"ERROR", "3"},
	{"WARNING", "4"},
	{"NOTICE", "5"},
	{"INFORMATIONAL", "6"},
	{"DEBUG", "7"},
}

Functions

This section is empty.

Types

type Config

type Config struct {
}

type Data

type Data struct {
	Timestamp      string `json:"timestamp"`
	Version        int    `json:"version"`
	Hostname       string `json:"hostname"`
	Content        string `json:"content"`
	Client         string `json:"client"`
	Facility       int    `json:"facility"`
	FacilityLabel  string `json:"facilityLabel"`
	Id             string `json:"id"`
	MsgId          string `json:"msgId"`
	Priority       int    `json:"priority"`
	ProcId         string `json:"procId"`
	Severity       int    `json:"severity"`
	SeverityLabel  string `json:"severityLabel"`
	StructuredData string `json:"structuredData"`
	Tag            string `json:"tag"`
	TlsPeer        string `json:"tlsPeer"`
	AppName        string `json:"appName"`
	Message        string `json:"message"`
}

type Handler

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

func New

func New(out io.Writer, config Config, restApiClient *zeropsRestApiClient.Handler) *Handler

func NewStdout added in v1.0.38

func NewStdout(config Config, restApiClient *zeropsRestApiClient.Handler) *Handler

func (*Handler) Run

func (h *Handler) Run(ctx context.Context, config RunConfig) error

func (*Handler) Writer added in v1.0.38

func (h *Handler) Writer() io.Writer

type InputValues

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

type Levels

type Levels [8][2]string

type Response

type Response struct {
	Items []Data `json:"items"`
}

type RunConfig

type RunConfig struct {
	Project        entity.Project
	ServiceId      uuid.ServiceStackId
	Container      entity.Container
	Limit          int
	MinSeverity    string
	MsgType        string
	Format         string
	FormatTemplate string
	Follow         bool
	Levels         Levels
	Tags           []string
}

Jump to

Keyboard shortcuts

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