Documentation
¶
Overview ¶
Package display coordinates the single interactive VM display across API replicas. Media never enters this package.
Index ¶
- Constants
- Variables
- type Guard
- type Store
- func (s *Store) Claim(ctx context.Context, ns, name, tier string) (string, error)
- func (s *Store) InUse(ctx context.Context, ns, name string) (bool, error)
- func (s *Store) Release(ctx context.Context, ns, name, id string) error
- func (s *Store) Renew(ctx context.Context, ns, name, id string) error
- func (s *Store) Revoke(ctx context.Context, ns, name string) (bool, error)
- func (s *Store) ServeHTTP(w http.ResponseWriter, r *http.Request, ns, name, action string)
Constants ¶
View Source
const ( // ClientTTL is how long a claim stays valid without a renewal, measured on // each participant's own monotonic clock from when it sent the request. ClientTTL = 4 * time.Second // FenceInterval is how long a contender must observe an unchanged // resourceVersion before it may take over a held lease. It exceeds the // worst case in which a partitioned owner could still be writing input: // its renewals fail, and its local input deadline passes, within ClientTTL // of losing API contact — long before FenceInterval elapses. FenceInterval = 12 * time.Second )
Variables ¶
View Source
var ErrBusy = errors.New("interactive display in use")
View Source
var ErrRevoked = errors.New("interactive display ownership revoked")
Functions ¶
This section is empty.
Types ¶
type Guard ¶
type Guard struct {
// contains filtered or unexported fields
}
Guard bounds validity using request-start times on this process's monotonic clock. A delayed renewal must not resurrect an expired owner.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(client kubernetes.Interface) *Store
func (*Store) Release ¶
Release is called only after media sockets/workers have stopped. A stale token can never release a successor. Tokens must not be logged or sent to guests.
func (*Store) Revoke ¶
Revoke marks the current owner revoked without freeing its slot. The old proxy/API must stop input before Release, or the full fence interval elapses.
Click to show internal directories.
Click to hide internal directories.