rpc

package
v0.0.0-...-73856a8 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package rpc performs RPC calls for a user, returning responses via typhon.

The package should be initialised with: rpc.SetInternalEdgeProxy() rpc.SetExternalEdgeProxy()

You may need to `kubectl port-forward service/edge-proxy-internal 8080:80`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InternalRequest

func InternalRequest(rpc *Request) (string, error)

InternalRequest sends an RPC call through the internal edge proxy. Both return values from this function should be printed to stdout if not empty/nil.

func NewRequest

func NewRequest(rpc *Request) (typhon.Request, error)

NewRequest creates a typhon request from an RPC request.

func SetExternalEdgeProxy

func SetExternalEdgeProxy(url string)

func SetInternalEdgeProxy

func SetInternalEdgeProxy(url string)

Types

type Request

type Request struct {
	Method, Path string
	Body         []byte
}

Request is a struct holding options for an RPC request.

Jump to

Keyboard shortcuts

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