Documentation
¶
Index ¶
- Variables
- func ChallengesUDCounter() metric.Int64UpDownCounter
- func ComputeUntil(until *time.Time, timeout *time.Duration) *time.Time
- func InstanceAttrs(challID, sourceID string, pool bool) attribute.Set
- func InstancesUDCounter() metric.Int64UpDownCounter
- func LClose(lock lock.RWLock)
- func LockChallenge(ctx context.Context, challengeID string) (lock.RWLock, error)
- func LockInstance(ctx context.Context, challengeID, identity string) (lock.RWLock, error)
- func LockTOTW(ctx context.Context) (lock.RWLock, error)
- type QueryServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_api_v1_common_common_proto protoreflect.FileDescriptor
Functions ¶
func ChallengesUDCounter ¶
func ChallengesUDCounter() metric.Int64UpDownCounter
func ComputeUntil ¶
ComputeUntil returns an instance until date based on a challenge until date and the challenge timeout.
No until, no timeout: nil No until, timeout: now+timeout until, no timeout: until until, timeout: min(now+timeout, until)
func InstanceAttrs ¶ added in v0.4.4
func InstancesUDCounter ¶
func InstancesUDCounter() metric.Int64UpDownCounter
func LockChallenge ¶
func LockInstance ¶
Types ¶
type QueryServer ¶
type QueryServer[T any] struct { // contains filtered or unexported fields }
QueryServer is a generic implementation of a synchronous gRPC server. Use it when dealing with a query that streams asynchronously, but gRPC requires it to be else it will crash the stream.
func NewQueryServer ¶
func NewQueryServer[T any](server grpc.ServerStream) *QueryServer[T]
NewQueryServer creates a throwable server to stream synchronously to a gRPC stream server.
func (*QueryServer[T]) SendMsg ¶
func (qs *QueryServer[T]) SendMsg(in T) error
SendMsg synchronously when asynchrouneous tasks is possible.
Click to show internal directories.
Click to hide internal directories.