process

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flow

type Flow struct {
	File            string    `json:"file"`
	Line            int       `json:"line"`
	Position        int       `json:"position"`
	Subroutine      string    `json:"subroutine"`
	Request         *HttpFlow `json:"req,omitempty"`
	BackendRequest  *HttpFlow `json:"bereq,omitempty"`
	BackendResponse *HttpFlow `json:"beresp,omitempty"`
	Response        *HttpFlow `json:"resp,omitempty"`
	Object          *HttpFlow `json:"object,omitempty"`
}

func NewFlow

func NewFlow(ctx *icontext.Context, sub *ast.SubroutineDeclaration) *Flow

type HttpFlow

type HttpFlow struct {
	Method     string            `json:"method,omitempty"`
	Host       string            `json:"host,omitempty"`
	URL        string            `json:"url,omitempty"`
	Headers    map[string]string `json:"headers"`
	StatusCode int               `json:"status_code,omitempty"`
	StatusText string            `json:"status_text,omitempty"`
}

type Log

type Log struct {
	Scope    string `json:"scope"`
	File     string `json:"file"`
	Line     int    `json:"line"`
	Position int    `json:"position"`
	Message  string `json:"message"`
}

func NewLog

func NewLog(l *ast.LogStatement, scope context.Scope, message string) *Log

type Process

type Process struct {
	Flows     []*Flow
	Logs      []*Log
	Restarts  int
	Backend   *value.Backend
	Cached    bool
	Error     error
	StartTime int64
	Response  *http.Response
}

func New

func New() *Process

func (*Process) Finalize

func (p *Process) Finalize(resp *http.Response) ([]byte, error)

Jump to

Keyboard shortcuts

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