Documentation ¶
Index ¶
- Variables
- func ChallengesUDCounter() metric.Int64UpDownCounter
- func ComputeUntil(until *time.Time, timeout *time.Duration) *time.Time
- func InstancesUDCounter() metric.Int64UpDownCounter
- func LClose(lock lock.RWLock)
- func LockChallenge(challengeId string) (lock.RWLock, error)
- func LockInstance(challengeId, sourceId string) (lock.RWLock, error)
- func LockTOTW() (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 InstancesUDCounter ¶
func InstancesUDCounter() metric.Int64UpDownCounter
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.