Documentation
¶
Overview ¶
Package simple is used for a trivial test of code that uses Service Weaver.
We have two components Source and Destination and ensure that a call to Source gets reflected in a call to Destination.
Index ¶
Constants ¶
View Source
const ServerTestResponse = "hello world"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Destination ¶
type Destination interface {
Getpid(_ context.Context) (int, error)
Record(_ context.Context, file, msg string) error
GetAll(_ context.Context, file string) ([]string, error)
RoutedRecord(_ context.Context, file, msg string) error
UpdateMetadata(_ context.Context) error
GetMetadata(_ context.Context) (map[string]string, error)
}
type Server ¶ added in v0.6.0
type Server interface {
Address(context.Context) (string, error)
ProxyAddress(context.Context) (string, error)
Shutdown(context.Context) error
}
Server is a component used to test Service Weaver listener handling. An HTTP server is started when this component is initialized. simple_test.go checks the functionality of the HTTP server by fetching from a well-known URL on the server.
Click to show internal directories.
Click to hide internal directories.