wire

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package wire converts between the SPECTRE service protocol and the domain model, so only the server's API boundary handles protocol messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DivergenceFromMessage

func DivergenceFromMessage(message *pb.Divergence) (model.Divergence, error)

DivergenceFromMessage restores a reported divergence, checking that it identifies its source and quarantine so every store can rely on them.

func DivergenceMessage

func DivergenceMessage(divergence model.Divergence) *pb.Divergence

DivergenceMessage returns the message that reports divergence.

func DivergencesJSON

func DivergencesJSON(divergences []model.Divergence) ([]byte, error)

DivergencesJSON returns divergences as the protocol's JSON list response, which is what the command line prints.

func FilterFromMessage

func FilterFromMessage(request *pb.ListDivergencesRequest) model.DivergenceFilter

FilterFromMessage restores the filter of a list request.

func FilterMessage

func FilterMessage(filter model.DivergenceFilter) *pb.ListDivergencesRequest

FilterMessage returns the request that lists the divergences filter selects.

Types

This section is empty.

Jump to

Keyboard shortcuts

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