altsvc

package
v0.0.0-...-08bc4dc Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AltSvc

type AltSvc struct {
	// Protocol is the alt-svc proto, e.g. h3.
	Protocol string
	// Host is the alt-svc's host, could be empty if
	// it's the same host as the raw request.
	Host string
	// Port is the alt-svc's port.
	Port string
	// Expire is the time that the alt-svc should expire.
	Expire time.Time
}

AltSvc is the parsed alt-svc.

type AltSvcJar

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

AltSvcJar is default implementation of Jar, which stores AltSvc in memory.

func NewAltSvcJar

func NewAltSvcJar() *AltSvcJar

NewAltSvcJar create a AltSvcJar which implements Jar.

func (*AltSvcJar) GetAltSvc

func (j *AltSvcJar) GetAltSvc(addr string) *AltSvc

func (*AltSvcJar) SetAltSvc

func (j *AltSvcJar) SetAltSvc(addr string, as *AltSvc)

type Jar

type Jar interface {
	// SetAltSvc store the AltSvc.
	SetAltSvc(addr string, as *AltSvc)
	// GetAltSvc get the AltSvc.
	GetAltSvc(addr string) *AltSvc
}

Jar is a container of AltSvc.

Jump to

Keyboard shortcuts

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