invoke

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package invoke provides functions for invoking lambda functions. It collects logs from lambda functions, as well as result.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

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

func Node

func Node(endpoint, authToken string, logSink LogSinkCallback) *HTTPClient

Node creates HTTPClient for calling node lambda function through api gateway

func Stage

func Stage(endpoint string, excludeLogs bool, cb func(*http.Response) error, authToken string, logSink LogSinkCallback) *HTTPClient

Stage creates HTTPClient for calling stage lambda function through api gateway

func (*HTTPClient) Do

func (b *HTTPClient) Do(method string, req interface{}, rsp interface{}) error

type Invoker

type Invoker interface {
	Invoke(name string, req, rsp interface{}, headers map[string]string) error
}

type LambdaClient

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

func Lambda

func Lambda(invoker Invoker, functionName string, logSink LogSinkCallback) *LambdaClient

Lambda creates LambdaClient for calling lambda function

func (*LambdaClient) Do

func (l *LambdaClient) Do(method string, req, rsp interface{}) error

type LogSinkCallback

type LogSinkCallback func(chan []byte)

Jump to

Keyboard shortcuts

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