serverinfo

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MultiProcKey is the field used to indicate that MultiProc map mode is enabled
	// The value contains the number of servers spawned.
	MultiProcKey = "MULTIPROC"
	// MapModeKey field is used to indicate which map mode is enabled
	// If none is set, we consider the unary map as default
	MapModeKey = "MAP_MODE"
)

Metadata keys used in the server info file

Variables

View Source
var END = fmt.Sprintf("%U__END__", '\\')

Functions

This section is empty.

Types

type ContainerType added in v1.3.2

type ContainerType string

type Language added in v1.3.2

type Language string
const (
	Go     Language = "go"
	Python Language = "python"
	Java   Language = "java"
	Rust   Language = "rust"
)

type MapMode added in v1.3.0

type MapMode string
const (
	UnaryMap  MapMode = "unary-map"
	StreamMap MapMode = "stream-map"
	BatchMap  MapMode = "batch-map"
)

type Option

type Option func(*Options)

Option is the interface to apply Options.

func WithServerInfoFilePath

func WithServerInfoFilePath(f string) Option

WithServerInfoFilePath sets the server info file path to the given path.

func WithServerInfoReadinessTimeout

func WithServerInfoReadinessTimeout(t time.Duration) Option

WithServerInfoReadinessTimeout sets the server info readiness timeout to the given timeout.

type Options

type Options struct {
	// contains filtered or unexported fields
}

func DefaultOptions

func DefaultOptions() *Options

DefaultOptions returns the default options.

func (*Options) ServerInfoFilePath

func (o *Options) ServerInfoFilePath() string

ServerInfoFilePath returns the server info file path.

func (*Options) ServerInfoReadinessTimeout

func (o *Options) ServerInfoReadinessTimeout() time.Duration

ServerInfoReadinessTimeout returns the server info readiness timeout.

type Protocol added in v1.3.2

type Protocol string
const (
	UDS Protocol = "uds"
	TCP Protocol = "tcp"
)

type ServerInfo added in v1.3.2

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

func SDKServerInfo

func SDKServerInfo(inputOptions ...Option) (*ServerInfo, error)

SDKServerInfo wait for the server to start and return the server info.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL