golang

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitFuncTmpl []byte
View Source
var MainFuncRawBytesTmpl []byte

MainFuncRawBytesTmpl the raw bytes serverless of the main function template

View Source
var MainFuncRxTmpl []byte

MainFuncRxTmpl the rxstream serverless of the main function template

View Source
var PartialsTmpl []byte

PartialsTmpl partials template, used for rendering the partials

Functions

func RenderTmpl

func RenderTmpl(tpl string, ctx *Context) ([]byte, error)

RenderTmpl renders the template with the given context

Types

type Context

type Context struct {
	// Name of the servcie
	Name string
	// ZipperAddrs is the addresses of the zipper server
	ZipperAddrs []string
	// Client credential
	Credential string
	// use environment variables
	UseEnv bool
}

Context defines context for the template

type GolangServerless

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

GolangServerless defines golang implementation of Serverless interface.

func (*GolangServerless) Build

func (s *GolangServerless) Build(clean bool) error

Build compiles the serverless to executable

func (*GolangServerless) Executable added in v0.1.6

func (s *GolangServerless) Executable() bool

func (*GolangServerless) Init

func (s *GolangServerless) Init(opts *serverless.Options) error

Init initializes the serverless

func (*GolangServerless) Run

func (s *GolangServerless) Run(verbose bool) error

Run compiles and runs the serverless

Jump to

Keyboard shortcuts

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