run

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MINIO_ENDPOINT_ENV   = "MINIO_ENDPOINT"
	MINIO_ACCESS_KEY_ENV = "MINIO_ACCESS_KEY"
	MINIO_SECRET_KEY_ENV = "MINIO_SECRET_KEY"
)

Variables

This section is empty.

Functions

func NewEvents

func NewEvents(pool worker.WorkerPool) (events.EventService, error)

Create new Dev EventService

func NewGateway

func NewGateway(address string) (gateway.GatewayService, error)

Create new HTTP gateway XXX: No External Args for function atm (currently the plugin loader does not pass any argument information)

func NewStorage added in v1.11.0

func NewStorage() (storage.StorageService, error)

Types

type BaseHttpGateway

type BaseHttpGateway struct {
	gateway.UnimplementedGatewayPlugin
	// contains filtered or unexported fields
}

func (*BaseHttpGateway) Start

func (s *BaseHttpGateway) Start(pool worker.WorkerPool) error

func (*BaseHttpGateway) Stop

func (s *BaseHttpGateway) Stop() error

type Function

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

func FunctionsFromHandlers

func FunctionsFromHandlers(p *project.Project) ([]*Function, error)

func (*Function) Name

func (f *Function) Name() string

func (*Function) Start

func (f *Function) Start(envMap map[string]string) error

func (*Function) Stop

func (f *Function) Stop() error

type FunctionOpts

type FunctionOpts struct {
	Name            string
	ProjectName     string
	Handler         string
	RunCtx          string
	ContainerEngine containerengine.ContainerEngine
}

type HttpMiddleware

type HttpMiddleware func(*fasthttp.RequestCtx, worker.WorkerPool) bool

type LocalServices

type LocalServices interface {
	Start(pool worker.WorkerPool) error
	Stop() error
	Running() bool
	Status() *LocalServicesStatus
}

func NewLocalServices

func NewLocalServices(s *project.Project) LocalServices

type LocalServicesStatus

type LocalServicesStatus struct {
	RunDir          string `yaml:"runDir"`
	GatewayAddress  string `yaml:"gatewayAddress"`
	MembraneAddress string `yaml:"membraneAddress"`
	MinioEndpoint   string `yaml:"minioEndpoint"`
}

type MinioServer

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

func NewMinio

func NewMinio(dir string, name string) (*MinioServer, error)

func (*MinioServer) GetApiPort

func (m *MinioServer) GetApiPort() int

func (*MinioServer) Start

func (m *MinioServer) Start() error

Start - Start the local Minio server

func (*MinioServer) Stop

func (m *MinioServer) Stop() error

type RunProcessPool

type RunProcessPool struct {
	worker.WorkerPool
	// contains filtered or unexported fields
}

func NewRunProcessPool

func NewRunProcessPool() *RunProcessPool

func (*RunProcessPool) AddWorker

func (r *RunProcessPool) AddWorker(w worker.Worker) error

func (*RunProcessPool) Listen

func (r *RunProcessPool) Listen(l WorkerListener)

func (*RunProcessPool) RemoveWorker

func (r *RunProcessPool) RemoveWorker(w worker.Worker) error

type RunStackState

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

func NewStackState

func NewStackState() *RunStackState

func StateFromPool added in v1.12.0

func StateFromPool(pool worker.WorkerPool) *RunStackState

func (*RunStackState) ApiTable

func (r *RunStackState) ApiTable(port int) (string, int)

func (*RunStackState) SchedulesTable

func (r *RunStackState) SchedulesTable(port int) (string, int)

func (*RunStackState) Tables added in v1.12.0

func (r *RunStackState) Tables(port int) string

func (*RunStackState) TopicTable

func (r *RunStackState) TopicTable(port int) (string, int)

func (*RunStackState) UpdateFromWorkerEvent

func (r *RunStackState) UpdateFromWorkerEvent(evt WorkerEvent)

type RunStorageService added in v1.11.0

type RunStorageService struct {
	storage.StorageService
	// contains filtered or unexported fields
}

func (*RunStorageService) Delete added in v1.11.0

func (r *RunStorageService) Delete(bucket string, key string) error

func (*RunStorageService) ListFiles added in v1.11.0

func (r *RunStorageService) ListFiles(bucket string) ([]*storage.FileInfo, error)

func (*RunStorageService) PreSignUrl added in v1.11.0

func (r *RunStorageService) PreSignUrl(bucket string, key string, operation storage.Operation, expiry uint32) (string, error)

func (*RunStorageService) Read added in v1.11.0

func (r *RunStorageService) Read(bucket string, key string) ([]byte, error)

func (*RunStorageService) Write added in v1.11.0

func (r *RunStorageService) Write(bucket string, key string, object []byte) error

type WorkerEvent

type WorkerEvent struct {
	Type   WorkerEventType
	Worker worker.Worker
}

type WorkerEventType

type WorkerEventType string
const (
	WorkerEventType_Add    WorkerEventType = "add"
	WorkerEventType_Remove WorkerEventType = "remove"
)

type WorkerListener

type WorkerListener = func(WorkerEvent)

type WorkerPoolEventService

type WorkerPoolEventService struct {
	events.UnimplementedeventsPlugin
	// contains filtered or unexported fields
}

func (*WorkerPoolEventService) Publish

func (s *WorkerPoolEventService) Publish(topic string, delay int, event *events.NitricEvent) error

Publish a message to a given topic

Jump to

Keyboard shortcuts

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