tail

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: Apache-2.0 Imports: 30 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunRelayTail

func RunRelayTail(ctx context.Context)

RunRelayTail runs relay tail

Types

type AuditMsg

type AuditMsg struct {
	Timestamp      string  `json:"ts"`
	XID            xid.ID  `json:"id"`
	StatusCode     int     `json:"sc"`
	UserName       string  `json:"un"`
	OrganizationID string  `json:"o"`
	PartnerID      string  `json:"p"`
	ProjectName    string  `json:"pr"`
	RemoteAddr     string  `json:"ra"`
	Duration       float64 `json:"d"`
	ClusterName    string  `json:"cn"`
	APIVersion     string  `json:"av"`
	Kind           string  `json:"k"`
	Namespace      string  `json:"ns"`
	Name           string  `json:"n"`
	Method         string  `json:"m"`
	URL            string  `json:"url"`
	Query          string  `json:"q"`
	Written        int64   `json:"w"`
	SessionType    string  `json:"st"`
}

AuditMsg represents audit message

func (*AuditMsg) Reset

func (m *AuditMsg) Reset()

Reset resets audit message

type LogMsg

type LogMsg struct {
	//Level      string  `json:"level"`
	//Message    string  `json:"msg"`
	Timestamp  string  `json:"ts"`
	XID        xid.ID  `json:"xid"`
	Method     string  `json:"method"`
	URL        string  `json:"url"`
	Query      string  `json:"query"`
	ServerName string  `json:"serverName"`
	User       string  `json:"user"`
	RemoteAddr string  `json:"remoteAddr"`
	StatusCode int     `json:"statusCode"`
	Written    int64   `json:"written"`
	Duration   float64 `json:"duration"`
}

LogMsg represents log message

type Transformer

type Transformer interface {
	Transform(lm *LogMsg, am *AuditMsg) error
}

Transformer is the interface for transforming relay log message into audit message

func NewTransformer

func NewTransformer(authzPool sentryrpc.SentryAuthorizationPool) (Transformer, error)

NewTransformer returns new relay log transformer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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