loaders

command
v0.37.26 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

README

Loader Example

main.go loads a bundle either from a file or HTTP server.

Setup

The example directory includes some Rego source files. The first step is to compile them into Wasm modules. Run:

opa build -t wasm -e example/allow ./example.rego

Running the Example

In the directory of the main.go, execute:

go run main.go bundle.tar.gz

To load the accompanied bundle file. Similarly, execute:

go run main.go http://url/to/bundle.tar.gz

to test downloading the bundle from a HTTP server.

Documentation

Overview

Copyright 2020 The OPA Authors. All rights reserved. Use of this source code is governed by an Apache2 license that can be found in the LICENSE file.

Jump to

Keyboard shortcuts

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