native

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AclResource = core.AclResource[*Runtime]
View Source
var BackendResource = core.BackendResource[*Runtime]
View Source
var SubroutineResource = core.SubroutineResource[*Runtime]
View Source
var TableResource = core.TableResource[*Runtime]

Functions

func LoggerInitiator

func LoggerInitiator(name string) (io.Writer, error)

Types

type Runtime

type Runtime struct {
	*core.Runtime[*Runtime]
	State           vintage.State
	Request         *http.Request
	BackendRequest  *http.Request
	BackendResponse *http.Response
	Response        *http.Response
	ClientResponse  http.ResponseWriter
}

func NewRuntime

func NewRuntime(w http.ResponseWriter, r *http.Request) (*Runtime, error)

func (*Runtime) BackendBodyBytesWritten

func (r *Runtime) BackendBodyBytesWritten() (int64, error)

Used for bereq.body_bytes_written

func (*Runtime) BackendBytesWritten

func (r *Runtime) BackendBytesWritten() (int64, error)

Used for bereq.bytes_written

func (*Runtime) BackendHeaderBytesWritten

func (r *Runtime) BackendHeaderBytesWritten() int64

Used for bereq.header_bytes_written

func (*Runtime) CreateBackendRequest

func (r *Runtime) CreateBackendRequest() vintage.RawHeader

func (*Runtime) CreateClientResponse

func (r *Runtime) CreateClientResponse() (vintage.RawHeader, error)

func (*Runtime) CreateObjectResponse

func (r *Runtime) CreateObjectResponse(statusCode int, response string) (vintage.RawHeader, error)

func (*Runtime) Execute

func (r *Runtime) Execute(ctx context.Context) error

func (*Runtime) IsIpv6

func (r *Runtime) IsIpv6() bool

Used for req.is_ipv6

func (*Runtime) ObjectAge

func (r *Runtime) ObjectAge() time.Duration

Used for obj.age

func (*Runtime) ObjectCacheable

func (r *Runtime) ObjectCacheable() bool

Used for obj.cachable

func (*Runtime) ObjectHits

func (r *Runtime) ObjectHits() int64

Used for obj.hits

func (*Runtime) Proxy

func (r *Runtime) Proxy(ctx context.Context, backendName string) (vintage.RawHeader, error)

func (*Runtime) Release

func (r *Runtime) Release()

func (*Runtime) RequestBody

func (r *Runtime) RequestBody() (string, error)

Used for req.body

func (*Runtime) RequestBodyBase64

func (r *Runtime) RequestBodyBase64() (string, error)

Used for req.body.base64

func (*Runtime) RequestBodyBytesRead

func (r *Runtime) RequestBodyBytesRead() (int64, error)

Used for req.body_bytes_read

func (*Runtime) RequestBytesRead

func (r *Runtime) RequestBytesRead() (int64, error)

Used for req.bytes_read

func (*Runtime) RequestURL

func (r *Runtime) RequestURL(req *http.Request) string

Used for req.url and bereq.url

func (*Runtime) ResponseBody

func (r *Runtime) ResponseBody(resp *http.Response) (string, error)

Used for resp.response and beresp.response

func (*Runtime) SetResponseBody

func (r *Runtime) SetResponseBody(resp *http.Response, body string)

Used for beresp.response and resp.response setting

func (*Runtime) SetURL

func (r *Runtime) SetURL(req *http.Request, dst *url.URL)

Used for req.url and bereq.url setting

func (*Runtime) WriteResponse

func (r *Runtime) WriteResponse() ([3]int64, error)

Jump to

Keyboard shortcuts

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