simple

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

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
}

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.

type Source

type Source interface {
	Emit(ctx context.Context, file, msg string) error
}

Jump to

Keyboard shortcuts

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