rtlog

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0, BSD-3-Clause Imports: 1 Imported by: 1

Documentation

Overview

Package rtlog provides an interface to real-time logging endpoints. Refer to https://developer.fastly.com/reference/api/logging/ for more information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

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

Endpoint represents a real-time logging endpoint.

func Open

func Open(name string) *Endpoint

Open returns an endpoint corresponding to the given name. Names are case sensitive. Calling Open with a name that doesn't correspond to any logging endpoint available in your service will still return a usable endpoint, and writes to that endpoint will succeed. Refer to your service dashboard to diagnose missing log events.

func (*Endpoint) Write

func (e *Endpoint) Write(p []byte) (int, error)

Write implements io.Writer, writing len(p) bytes from p to the endpoint. Returns the number of bytes written, and any error encountered. By contract, if n < len(p), the returned error will be non-nil.

Each call to Write produces a single log event.

Jump to

Keyboard shortcuts

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