logs

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package logs contains commands to view Fastly managed logs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	ID   string `json:"batch_id"`
	Logs []Log  `json:"logs"`
}

Batch encompasses a batch ID and the logs for this batch.

type Log

type Log struct {
	// SequenceNum is the message sequence number used to reorder
	// messages.
	SequenceNum int `json:"sequence_number"`
	// RequestTime is the time in microseconds when the request
	// was received.
	RequestStart int64 `json:"request_start_us"`
	// Stream is the C@E stream, either stdout or stderr.
	Stream string `json:"stream"`
	// RequestID is a UUID representing individual requests to the
	// particular WASM service.
	RequestID string `json:"id"`
	// Message is the actual message body the user wants printed.
	Message string `json:"message"`
}

Log defines the message envelope that compute@edge (C@E) wraps the user messages in.

func (*Log) RequestStartFromRaw

func (l *Log) RequestStartFromRaw() time.Time

RequestStartFromRaw return a time.Time object representing the RequestStart data.

func (*Log) String

func (l *Log) String() string

String is used to print a log for the tail output.

type RootCommand

type RootCommand struct {
	common.Base
}

RootCommand is the parent command for all subcommands in this package. It should be installed under the primary root command.

func NewRootCommand

func NewRootCommand(parent common.Registerer, globals *config.Data) *RootCommand

NewRootCommand returns a new command registered in the parent.

func (*RootCommand) Exec

func (c *RootCommand) Exec(in io.Reader, out io.Writer) error

Exec implements the command interface.

type TailCommand

type TailCommand struct {
	common.Base

	Input fastly.CreateManagedLoggingInput
	// contains filtered or unexported fields
}

TailCommand represents the CLI subcommand for Log Tailing.

func NewTailCommand

func NewTailCommand(parent common.Registerer, globals *config.Data) *TailCommand

NewTailCommand returns a usable command registered under the parent.

func (*TailCommand) Exec

func (c *TailCommand) Exec(in io.Reader, out io.Writer) error

Exec invokes the application logic for the command.

Jump to

Keyboard shortcuts

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