spectrepbconnect

package
v0.55.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// SpectreServiceUpdateProcedure is the procedure name of the SpectreService's Update RPC.
	SpectreServiceUpdateProcedure = "/spectre.v1.SpectreService/Update"
	// SpectreServiceListDivergencesProcedure is the procedure name of the SpectreService's
	// ListDivergences RPC.
	SpectreServiceListDivergencesProcedure = "/spectre.v1.SpectreService/ListDivergences"
	// SpectreServiceClearDivergencesProcedure is the procedure name of the SpectreService's
	// ClearDivergences RPC.
	SpectreServiceClearDivergencesProcedure = "/spectre.v1.SpectreService/ClearDivergences"
)

These constants are the procedure names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// SpectreServiceName is the fully-qualified name of the SpectreService service.
	SpectreServiceName = "spectre.v1.SpectreService"
)

Variables

This section is empty.

Functions

func RegisterSpectreServiceHandler added in v0.45.4

func RegisterSpectreServiceHandler(server *connect.Server, svc SpectreServiceHandler)

RegisterSpectreServiceHandler registers svc as the spectre.v1.SpectreService implementation on server.

Types

type SpectreServiceClient

type SpectreServiceClient interface {
	// Update streams a mirror's state for as long as the mirror runs. Each
	// stream begins with the whole state, then changes it or keeps it alive.
	Update(context.Context) (SpectreServiceUpdateClientStream, error)
	// ListDivergences returns the state of each mirror the server still
	// considers current, and the latest divergence each mirror reported.
	ListDivergences(context.Context, *spectrepb.ListDivergencesRequest) (*spectrepb.ListDivergencesResponse, error)
	// ClearDivergences removes the divergences of one service environment, and
	// ignores quarantines that began before it.
	ClearDivergences(context.Context, *spectrepb.ClearDivergencesRequest) (*spectrepb.ClearDivergencesResponse, error)
}

SpectreServiceClient is a client for the spectre.v1.SpectreService service.

func NewSpectreServiceClient

func NewSpectreServiceClient(client *connect.Client) SpectreServiceClient

NewSpectreServiceClient constructs a client for the spectre.v1.SpectreService service. Multiple service clients may share a single connect.Client.

type SpectreServiceHandler

type SpectreServiceHandler interface {
	// Update streams a mirror's state for as long as the mirror runs. Each
	// stream begins with the whole state, then changes it or keeps it alive.
	Update(context.Context, SpectreServiceUpdateServerStream) (*spectrepb.UpdateResponse, error)
	// ListDivergences returns the state of each mirror the server still
	// considers current, and the latest divergence each mirror reported.
	ListDivergences(context.Context, *spectrepb.ListDivergencesRequest) (*spectrepb.ListDivergencesResponse, error)
	// ClearDivergences removes the divergences of one service environment, and
	// ignores quarantines that began before it.
	ClearDivergences(context.Context, *spectrepb.ClearDivergencesRequest) (*spectrepb.ClearDivergencesResponse, error)
}

SpectreServiceHandler is an implementation of the spectre.v1.SpectreService service.

type SpectreServiceUpdateClientStream added in v0.48.0

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

SpectreServiceUpdateClientStream is the client stream for the SpectreService's Update RPC.

func (SpectreServiceUpdateClientStream) CloseAndReceive added in v0.48.0

CloseAndReceive closes the request side of the stream and returns the single response message. It reads the stream to completion to release its resources.

func (SpectreServiceUpdateClientStream) Send added in v0.48.0

Send sends a request message to the server.

func (SpectreServiceUpdateClientStream) SendHeaders added in v0.48.0

func (s SpectreServiceUpdateClientStream) SendHeaders() error

SendHeaders opens the stream and flushes the request headers without a message. The first Send or Receive does this implicitly.

type SpectreServiceUpdateServerStream added in v0.48.0

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

SpectreServiceUpdateServerStream is the server stream for the SpectreService's Update RPC.

func (SpectreServiceUpdateServerStream) Receive added in v0.48.0

Receive returns the next request message from the client.

type UnimplementedSpectreServiceHandler

type UnimplementedSpectreServiceHandler struct{}

UnimplementedSpectreServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedSpectreServiceHandler) Update added in v0.47.0

Jump to

Keyboard shortcuts

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