server

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package server provides helpers for building and running a sansshell server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildServer

func BuildServer(c credentials.TransportCredentials, policy string, logger logr.Logger, authzHooks ...rpcauth.RPCAuthzHook) (*grpc.Server, error)

BuildServer creates a gRPC server, attaches the OPA policy interceptor with supplied args and then registers all of the imported SansShell modules. Separating this from Serve primarily facilitates testing.

func Serve

func Serve(hostport string, c credentials.TransportCredentials, policy string, logger logr.Logger, authzHooks ...rpcauth.RPCAuthzHook) error

Serve wraps up BuildServer in a succinct API for callers passing along various parameters. It will automatically add an authz hook for HostNet based on the listener address. Additional hooks are passed along after this one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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