mock

package
v0.14.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server represents a mock server.

func NewServer

func NewServer(config *ServerConfig, l logger.Logger) (*Server, error)

NewServer returns a new mock server.

func (*Server) Addrs

func (s *Server) Addrs() (map[string]string, error)

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

func (*Server) Wait

func (s *Server) Wait(ctx context.Context) error

type ServerConfig

type ServerConfig struct {
	Mocks     []protocol.Mock                `yaml:"mocks,omitempty"`
	Protocols map[string]yamlutil.RawMessage `yaml:"protocols,omitempty"`
}

ServerConfig represents a mock server configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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