speculator

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostAndPortFromSpecKey

func GetHostAndPortFromSpecKey(key SpecKey) (host, port string, err error)

Types

type AddressInfo

type AddressInfo struct {
	IP   string
	Port string
}

func GetAddressInfoFromAddress

func GetAddressInfoFromAddress(address string) (*AddressInfo, error)

type Config

type Config struct {
	OperationGeneratorConfig _spec.OperationGeneratorConfig
}

type SpecKey

type SpecKey string

func GetSpecKey

func GetSpecKey(host, port string) SpecKey

type Speculator

type Speculator struct {
	Specs map[SpecKey]*_spec.Spec `json:"specs,omitempty"`
	// contains filtered or unexported fields
}

func CreateSpeculator

func CreateSpeculator(config Config) *Speculator

func DecodeState

func DecodeState(filePath string, config Config) (*Speculator, error)

func (*Speculator) ApplyApprovedReview

func (s *Speculator) ApplyApprovedReview(specKey SpecKey, approvedReview *_spec.ApprovedSpecReview) error

func (*Speculator) DiffTelemetry

func (s *Speculator) DiffTelemetry(telemetry *_spec.Telemetry, diffSource _spec.DiffSource) (*_spec.APIDiff, error)

func (*Speculator) DumpSpecs

func (s *Speculator) DumpSpecs()

func (*Speculator) EncodeState

func (s *Speculator) EncodeState(filePath string) error

func (*Speculator) HasApprovedSpec

func (s *Speculator) HasApprovedSpec(key SpecKey) bool

func (*Speculator) HasProvidedSpec

func (s *Speculator) HasProvidedSpec(key SpecKey) bool

func (*Speculator) InitSpec

func (s *Speculator) InitSpec(host, port string) error

func (*Speculator) LearnTelemetry

func (s *Speculator) LearnTelemetry(telemetry *_spec.Telemetry) error

func (*Speculator) LoadProvidedSpec

func (s *Speculator) LoadProvidedSpec(key SpecKey, providedSpec []byte, pathToPathID map[string]string) error

func (*Speculator) SuggestedReview

func (s *Speculator) SuggestedReview(specKey SpecKey) (*_spec.SuggestedSpecReview, error)

func (*Speculator) UnsetApprovedSpec

func (s *Speculator) UnsetApprovedSpec(key SpecKey) error

func (*Speculator) UnsetProvidedSpec

func (s *Speculator) UnsetProvidedSpec(key SpecKey) error

Jump to

Keyboard shortcuts

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