What is the method of Knative Serving SDK development?
This article mainly explains "what is the method of Knative Serving SDK development". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the method of Knative Serving SDK development".
Golang Context
Before we officially introduce Knative Serving SDK, let's briefly introduce the mechanism of Golang Context. Because the initialization and information transmission of client and Informer in Knative Serving are completely based on Golang Context.
Golang is a Context introduced from version 1.7. the Context of Golang can simplify the data transmission, cancellation signal and expiration time between multiple goroutine and request domains. Context has two main functions:
Transmit the necessary data
Coordinate control, such as terminating goroutein, setting timeout, and so on.
Context definition
Context itself is an interface.
Type Context interface {Deadline () (deadline time.Time, ok bool) Done ()