Documentation ¶
Overview ¶
Package info is used for the gRPC server to provide the information such as protocol, sdk version, language, etc, to the client.
The server information can be used by the client to determine:
- what is the right protocol to use (UDS or TCP)
- what is the numaflow sdk version used by the server
- what is language used by the server
The gRPC server (UDF, UDSink, etc.) is supposed to have a shared file system with the client (numa container).
Write() The gPRC server must use this function to write the correct ServerInfo when it starts.
Read() The client is supposed to call the function to read the server information, before it starts to communicate with the gRPC server.
WaitUntilReady() This function checks if the server info file is ready to read. The client (numa container) is supposed to call the function before it starts to Read() the server info file.
Index ¶
Constants ¶
const MinimumNumaflowVersion = "1.2.0-rc4"
MinimumNumaflowVersion specifies the minimum Numaflow version required by the current SDK version
Variables ¶
var END = fmt.Sprintf("%U__END__", '\\') // U+005C__END__
Functions ¶
func GetSDKVersion ¶
func GetSDKVersion() string
func WaitUntilReady ¶
WaitUntilReady waits until the server info is ready
func Write ¶
func Write(svrInfo *ServerInfo, opts ...Option) error
Write writes the server info to a file
Types ¶
type Option ¶
type Option func(*options)
func WithServerInfoFilePath ¶
WithServerInfoFilePath sets the server info file path
type ServerInfo ¶
type ServerInfo struct { Protocol Protocol `json:"protocol"` Language Language `json:"language"` MinimumNumaflowVersion string `json:"minimum_numaflow_version"` Version string `json:"version"` Metadata map[string]string `json:"metadata"` }
ServerInfo is the information about the server