gocloud.dev: gocloud.dev/server/xrayserver Index | Files

package xrayserver

import "gocloud.dev/server/xrayserver"

Package xrayserver provides the diagnostic hooks for a server using AWS X-Ray.

Index

Package Files

server.go

Variables

var ServiceSet = wire.NewSet(
    NewXRayClient,
    wire.Bind((*xrayiface.XRayAPI)(nil), (*xray.XRay)(nil)),
)

ServiceSet is a Wire provider set that provides the AWS X-Ray service client given an AWS session.

var Set = wire.NewSet(
    server.Set,
    ServiceSet,
    NewExporter,
    wire.Bind((*trace.Exporter)(nil), (*exporter.Exporter)(nil)),
    NewRequestLogger,
    wire.Bind((*requestlog.Logger)(nil), (*requestlog.NCSALogger)(nil)),
)

Set is a Wire provider set that provides the diagnostic hooks for *server.Server. This set includes ServiceSet.

func NewExporter Uses

func NewExporter(api xrayiface.XRayAPI) (*exporter.Exporter, func(), error)

NewExporter returns a new X-Ray exporter.

The second return value is a Wire cleanup function that calls Close on the exporter, ignoring the error.

func NewRequestLogger Uses

func NewRequestLogger() *requestlog.NCSALogger

NewRequestLogger returns a request logger that sends entries to stdout.

func NewXRayClient Uses

func NewXRayClient(p client.ConfigProvider) *xray.XRay

NewXRayClient returns a new AWS X-Ray client.

Package xrayserver imports 10 packages (graph) and is imported by 4 packages. Updated 2019-01-28. Refresh now. Tools for package owners.