calls

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

How long a window waits on each call it makes of its server: a call answered at once is given up once the wait set passed, a call long by its nature is waited on as long as it takes, and a stream stays open while it keeps coming or its server still answers when asked

Index

Constants

View Source
const Least = 5 * time.Second

Least wait a call is given, a shorter wait set counting as this; none set waits as long as it takes

View Source
const Offered = 30 * time.Second

How long a window offers to ask a call again once its server did not answer it in time, before the call is given up

Variables

This section is empty.

Functions

func Deadline

func Deadline(class Class, wait time.Duration) time.Duration

How long a call of the class is given before it is given up, under the wait set; none for a call that is not given up

func Quiet

func Quiet(class Class, wait time.Duration) time.Duration

How long a call of the class may send nothing before its server is asked whether it still answers, under the wait set; none for a call that is never asked after

func Repeatable

func Repeatable(procedure string, idempotent bool) bool

Whether a call of the procedure may be asked again with no harm: its service says it changes nothing or changes nothing more for being asked twice (the idempotency of its method, given as the level connect carries), else the name of its method begins with a word that only reads. Any other call may have changed something before its answer was lost

func Title

func Title(procedure string) string

The call of the procedure in words, the service and then what it does, such as Session list for /icebath.sessions.v1.SessionService/List

func Waited

func Waited(wait time.Duration) time.Duration

The wait set as a call takes it: none for none, else at least Least

Types

type Class

type Class int

Kinds of call by how long a window waits on them

const (
	// A call answered at once, given up once the wait set passed
	Prompt Class = iota
	// A call long by its nature, such as an install, a download or a backup, waited on as long as it takes
	Long
	// A stream, open as long as it keeps coming: once it sent nothing for the wait set its server is asked whether it still answers, and
	// the stream is let go when it does not
	Stream
)

func Of

func Of(procedure string, stream bool) Class

Class of the call of the procedure, a stream or not as the call is opened

type Silent

type Silent struct {
	Procedure string
	Wait      time.Duration
}

A stream that sent nothing for the wait set, whose server then did not answer either

func (*Silent) Error

func (s *Silent) Error() string

type TimedOut

type TimedOut struct {
	Procedure string
	Wait      time.Duration
	Changes   bool
}

A call its server did not answer within the wait set. One that may change something may have been done on the server already

func (*TimedOut) Error

func (t *TimedOut) Error() string

func (*TimedOut) Said

func (t *TimedOut) Said() string

What went unanswered in a sentence, and that it may have been done already where it changes something

Jump to

Keyboard shortcuts

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