api

package
v0.0.0-...-d356a15 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	Dependency string
	Duration   time.Duration
	Error      error
	Name       string
	StartedAt  time.Time
}

type Client

type Client interface {
	Close() error
	RecordCalls(context.Context, RecordCallsRequest) error
}

Client defines the interface for interacting with the errcat-server.

func NewClient

func NewClient(addr url.URL) (Client, error)

NewClient creates a new client that connects to the errcat-server.

func NewClientWithDependencies

func NewClientWithDependencies(api pb.APIClient) Client

NewClientWithDependencies allows the passing of the API client directly. This is useful for mocking. In the event that API client is not a mock, the caller will be responsible for closing any underlying connections themselves.

type RecordCallsRequest

type RecordCallsRequest struct {
	Calls       []Call
	Environment string
	Service     string
}

Jump to

Keyboard shortcuts

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