Documentation
¶
Overview ¶
Package polaris implements onexmesh registry.Registrar and registry.Discovery backed by the Polaris service mesh (github.com/polarismesh/polaris-go).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDiscovery ¶
NewDiscovery creates a Polaris Discovery.
Types ¶
type Options ¶
type Options struct {
// Addr is the Polaris server address, e.g. "127.0.0.1:8091".
Addr string
// Namespace is the Polaris namespace to register/discover in.
Namespace string
// Token is the service access token, if required by the server.
Token string
// TTL is the heartbeat TTL in seconds; meaningful only when Heartbeat is true.
TTL int
// Heartbeat enables SDK-managed auto heartbeat (requires TTL).
Heartbeat bool
// Protocol is the service protocol, e.g. "grpc" or "http".
Protocol string
// Host is the local instance host used for registration.
Host string
// Port is the local instance port used for registration.
Port int
// Version is the service version.
Version string
// Metadata carries arbitrary instance metadata.
Metadata map[string]string
}
Options configures the Polaris backend.
Click to show internal directories.
Click to hide internal directories.