client

package
v0.45.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package client calls the SPECTRE server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client calls the SPECTRE server.

func New

func New(config Config) *Client

New returns a client of the SPECTRE server that config locates.

func (*Client) ClearDivergences

func (c *Client) ClearDivergences(ctx context.Context, service, environment string) error

ClearDivergences removes the divergences of one service environment.

func (*Client) ListDivergences

func (c *Client) ListDivergences(ctx context.Context, filter model.DivergenceFilter) ([]model.Divergence, error)

ListDivergences returns the divergences that filter selects, ordered by source.

func (*Client) Quarantine

func (c *Client) Quarantine(ctx context.Context, divergence model.Divergence) error

Quarantine records a mirror's quarantine. A mirror reports each one only once, so failures retry with backoff until the server accepts or rejects it.

type Config

type Config struct {
	URL string `name:"server-url" default:"${server_url}" placeholder:"URL" help:"Base URL of the SPECTRE server."`
}

Config locates the SPECTRE server.

func (Config) Validate added in v0.45.0

func (c Config) Validate() error

Validate checks that a server URL is set. Kong cannot require the flag, because its default, even when empty, counts as set.

Jump to

Keyboard shortcuts

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