whatdis

package module
v0.0.0-...-499e0fc Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 9 Imported by: 0

README

whatdis

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Action  string
	Fixed   FixedResponse
	Request Request
}

type Bernoulli

type Bernoulli struct {
	P float64
}

type Config

type Config struct {
	Endpoints map[string]Endpoint
}

type Endpoint

type Endpoint struct {
	Path       string
	Action     Action
	Methods    []string
	Middleware []Middleware
}

type Fail

type Fail struct {
	Distribution string
	Bernoulli    Bernoulli
}

type FixedResponse

type FixedResponse struct {
	Status int
	Text   string
	Json   string
}

type Middleware

type Middleware struct {
	Middleware string
	Sleep      Sleep
	Fail       Fail
}

type Normal

type Normal struct {
	Mean   float64
	StdDev float64
}

type Request

type Request struct {
	Url     string
	Method  string
	Headers []string
}

type Sleep

type Sleep struct {
	Distribution string
	Uniform      Uniform
	Normal       Normal
}

type Uniform

type Uniform struct {
	A int64
	B int64
}

type Whatdis

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

func NewWhatdis

func NewWhatdis(config *Config, logger *zap.SugaredLogger) *Whatdis

func (*Whatdis) Handler

func (s *Whatdis) Handler() http.Handler

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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