logger

package
v0.0.0-...-03dfc37 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetContext

func SetContext(ctx context.Context, req *ReqInfo) context.Context

SetContext sets ReqInfo in the context.

Types

type KeyVal

type KeyVal struct {
	Key string
	Val string
}

KeyVal - appended to ReqInfo.Tags

type ReqInfo

type ReqInfo struct {
	RemoteHost string   // Client Host/IP
	UserAgent  string   // User Agent
	RequestID  string   // x-amz-request-id
	API        string   // API name - GetObject PutObject NewMultipartUpload etc.
	BucketName string   // Bucket name
	ObjectName string   // Object name
	Tags       []KeyVal // Any additional info not accommodated by above fields
}

ReqInfo stores the request info.

func GetContext

func GetContext(ctx context.Context) *ReqInfo

GetContext returns ReqInfo if set.

func (*ReqInfo) AppendTags

func (r *ReqInfo) AppendTags(key string, val string)

AppendTags - appends key/val to ReqInfo.Tags

Jump to

Keyboard shortcuts

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