externaldata

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package externaldata contains helpers to provide a http server for policies that download their contents from an external source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is a http server that helps serve data for policies that load their data from an external source.

func NewServer

func NewServer(ctx context.Context) (*Server, error)

NewServer creates a new external data server.

func (*Server) ServePolicyData

func (s *Server) ServePolicyData(data []byte) (address, hash string)

ServePolicyData starts serving content and returns the URL and hash to be set in the policy.

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop shuts down the server.

Jump to

Keyboard shortcuts

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