Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NewMeshClient ¶ added in v2.1.0
type Server ¶
type Server interface {
// Start starts the server.
Start() error
// Stop stops the server.
Stop() error
// Addr returns the listening address.
Addr() string
// Scheme returns the protocol scheme.
Scheme() string
// Endpoint returns the service endpoint.
Endpoint() *endpoint.Endpoint
// RegisterService registers a service.
RegisterService(desc, service any) error
}
type Transporter ¶
type Transporter interface {
// Name returns the transporter component name.
Name() string
// NewServer creates a transport server.
NewServer() (Server, error)
// NewClient creates a transport client.
//
// The target may take one of the following forms:
//
// direct://127.0.0.1:8011 direct connection by address
// direct://711baf8d-8a06-11ef-b7df-f4f19e1f0070 direct connection by instance ID
// discovery://service_name service discovery by service name
NewClient(target string) (Client, error)
// SetDefaultDiscovery sets the default service discovery component.
SetDefaultDiscovery(discovery registry.Discovery)
// Close closes the transporter and releases all client connections and resources.
Close() error
}
Click to show internal directories.
Click to hide internal directories.