mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-30 02:29:08 +02:00
Describe the approval no-match result and the cursor-skip key as they behave
This commit is contained in:
@@ -7271,10 +7271,11 @@ func (x *RespondApprovalRequest) GetViewOnly() bool {
|
|||||||
type RespondApprovalResponse struct {
|
type RespondApprovalResponse struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
// matched is true when request_id named a prompt that was still waiting.
|
// matched is true when request_id named a prompt that was still waiting.
|
||||||
// False covers three cases and does not distinguish them: request_id was
|
// False means it was not, for any reason and without saying which: never
|
||||||
// never known, the prompt had already been answered, or it had expired and
|
// known, already answered, expired, or abandoned because the prompt never
|
||||||
// the connection was denied. In all three this call changed nothing, so the
|
// reached a UI or the daemon shut the request down. What they share is that
|
||||||
// UI must not report the outcome the user picked as having taken effect.
|
// this call changed nothing, so the UI must not report the outcome the user
|
||||||
|
// picked as having taken effect.
|
||||||
Matched bool `protobuf:"varint,1,opt,name=matched,proto3" json:"matched,omitempty"`
|
Matched bool `protobuf:"varint,1,opt,name=matched,proto3" json:"matched,omitempty"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
|||||||
@@ -1127,9 +1127,10 @@ message RespondApprovalRequest {
|
|||||||
|
|
||||||
message RespondApprovalResponse {
|
message RespondApprovalResponse {
|
||||||
// matched is true when request_id named a prompt that was still waiting.
|
// matched is true when request_id named a prompt that was still waiting.
|
||||||
// False covers three cases and does not distinguish them: request_id was
|
// False means it was not, for any reason and without saying which: never
|
||||||
// never known, the prompt had already been answered, or it had expired and
|
// known, already answered, expired, or abandoned because the prompt never
|
||||||
// the connection was denied. In all three this call changed nothing, so the
|
// reached a UI or the daemon shut the request down. What they share is that
|
||||||
// UI must not report the outcome the user picked as having taken effect.
|
// this call changed nothing, so the UI must not report the outcome the user
|
||||||
|
// picked as having taken effect.
|
||||||
bool matched = 1;
|
bool matched = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,10 +127,15 @@ type session struct {
|
|||||||
cursorSkipMu sync.Mutex
|
cursorSkipMu sync.Mutex
|
||||||
// cursorSkipSeen holds the cursor-skip diagnostics already emitted, so the
|
// cursorSkipSeen holds the cursor-skip diagnostics already emitted, so the
|
||||||
// Cursor pseudo-encoding path says each distinct reason once instead of
|
// Cursor pseudo-encoding path says each distinct reason once instead of
|
||||||
// taking all of them silently. Keyed by the formatted line rather than
|
// taking all of them silently. Per reason rather than once per session: a
|
||||||
// throttled once per session: a client can negotiate the encoding
|
// client can negotiate the encoding mid-session and the cursor source can
|
||||||
// mid-session and the cursor source can start failing later, and the reason
|
// start failing later, and whichever reason comes first must not swallow the
|
||||||
// that happens to come first must not swallow the ones that follow.
|
// ones that follow.
|
||||||
|
//
|
||||||
|
// Keyed by the fixed reason token logCursorSkip is called with, never by the
|
||||||
|
// formatted line: the messages carry sprite dimensions from the capturer, so
|
||||||
|
// keying on them would let a source returning junk metadata mint an entry
|
||||||
|
// per frame and grow this map for the life of the session.
|
||||||
cursorSkipSeen map[string]struct{}
|
cursorSkipSeen map[string]struct{}
|
||||||
// clientJPEGQuality and clientZlibLevel hold the 0..9 levels the client
|
// clientJPEGQuality and clientZlibLevel hold the 0..9 levels the client
|
||||||
// advertised via the QualityLevel / CompressLevel pseudo-encodings, or
|
// advertised via the QualityLevel / CompressLevel pseudo-encodings, or
|
||||||
|
|||||||
Reference in New Issue
Block a user