nitro

package
v0.0.0-...-f003305 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MPL-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attest

func Attest(nonce, userData, publicKey []byte) ([]byte, error)

Attest takes as input a nonce, user-provided data and a public key, and then asks the Nitro hypervisor to return a signed attestation document that contains all three values.

func DialContext

func DialContext(ctx context.Context, network, addr string) (net.Conn, error)

DialContext is a net.Dial wrapper which additionally allows connecting to vsock networks

func EnclaveHealthCheck

func EnclaveHealthCheck(w http.ResponseWriter, r *http.Request)

EnclaveHealthCheck - status check handler for nitro enclave service

func NewProxyRoundTripper

func NewProxyRoundTripper(ctx context.Context, addr string) http.RoundTripper

NewProxyRoundTripper returns an http.RoundTripper which routes outgoing requests through the proxy addr

func NewReverseProxyServer

func NewReverseProxyServer(
	addr string,
	upstreamURL string,
) (*http.Server, error)

NewReverseProxyServer returns an HTTP server acting as a reverse proxy for the upstream addr specified

func ServeOpenProxy

func ServeOpenProxy(
	ctx context.Context,
	port uint32,
	connectTimeout time.Duration,
) error

ServeOpenProxy creates a new open HTTP proxy listening on the specified vsock port

Types

type NotVsockAddrError

type NotVsockAddrError struct{}

NotVsockAddrError indicates that the string does not have the correct structure for a vsock address

func (NotVsockAddrError) Error

func (NotVsockAddrError) Error() string

type VsockLogServer

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

VsockLogServer - implementation of a log server over vsock

func NewVsockLogServer

func NewVsockLogServer(ctx context.Context, port uint32) VsockLogServer

NewVsockLogServer - create a new VsockLogServer

func (VsockLogServer) Serve

func (s VsockLogServer) Serve(l net.Listener) error

Serve - interface implementation for Serve for VsockLogServer

type VsockWriter

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

VsockWriter - structure definition of a vsock writer

func NewVsockWriter

func NewVsockWriter(addr string) *VsockWriter

NewVsockWriter - create a new vsock writer

func (VsockWriter) Close

func (w VsockWriter) Close() error

Close - interface implementation of closer for VsockWriter

func (*VsockWriter) Connect

func (w *VsockWriter) Connect() error

Connect - interface implementation for connect method for VsockWriter

func (VsockWriter) Write

func (w VsockWriter) Write(p []byte) (n int, err error)

Write -interface implementation of writer for VsockWriter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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