Help us shape the future of Go! Take the 2026 Go Developer Survey

gcplro

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package gcplro is an in-memory google.longrunning.Operations server for the GCP emulators. Operations are recorded already finished, so Wait and Cancel never block or change state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Done

func Done(name string, meta, resp proto.Message) (*longrunningpb.Operation, error)

Done builds a successfully finished operation.

Types

type Store

type Store struct {
	longrunningpb.UnimplementedOperationsServer
	// contains filtered or unexported fields
}

Store holds operations by full name and serves them over the Operations gRPC API.

func New

func New(name string) *Store

New creates an empty Store.

func (*Store) CancelOperation

CancelOperation succeeds without effect: a finished operation cannot be cancelled.

func (*Store) DeleteOperation

DeleteOperation removes the named operation.

func (*Store) GetOperation

GetOperation returns the named operation.

func (*Store) ListOperations

ListOperations lists the operations directly under in.Name ("<parent>/operations/<id>"), ordered by name.

func (*Store) Lookup

func (s *Store) Lookup(name string) (*longrunningpb.Operation, bool)

Lookup returns a copy of the named operation.

func (*Store) Put

Put records op and returns a copy of it.

func (*Store) Reset

func (s *Store) Reset()

Reset drops every operation.

func (*Store) Restore

func (s *Store) Restore(snap map[string]json.RawMessage) error

Restore replaces the stored operations with a Snapshot result.

func (*Store) Snapshot

func (s *Store) Snapshot() map[string]json.RawMessage

Snapshot serialises every operation as protojson.

func (*Store) WaitOperation

WaitOperation returns the named operation at once because every operation is already finished.

Jump to

Keyboard shortcuts

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