proto

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorTemplate = `` /* 134-byte string literal not displayed */

)

Functions

This section is empty.

Types

type ProtoBuilder

type ProtoBuilder interface {
	// slave side
	// These functions are executed in the following order
	Init(context.Context, *pb.ExecuteTaskRequest) error
	PreRequest(*pb.ExecuteTaskRequest) (interface{}, interface{})
	Request(context.Context, interface{}, *pb.ExecuteTaskRequest) interface{}
	PostRequest(interface{}) error
	Destroy(interface{}) error
	Done(time.Duration) (interface{}, error)

	// master side
	Split(*pb.ExecuteTaskRequest, int) []*pb.ExecuteTaskRequest
	Merge([]string) (interface{}, error)

	// client side
	CreateTask(*config.ProtoConfigArgs) (string, error)
}

type ProtoBuilderBase

type ProtoBuilderBase struct {
	ProtoBuilder
	Template *string
	Stats    interface{}
}

func (*ProtoBuilderBase) CancelTask

func (proto *ProtoBuilderBase) CancelTask(configArgs *config.ProtoConfigArgs) (string, error)

func (*ProtoBuilderBase) Render

func (proto *ProtoBuilderBase) Render(data string, callback string) (string, error)

func (*ProtoBuilderBase) RunTask added in v0.1.1

func (proto *ProtoBuilderBase) RunTask(configArgs *config.ProtoConfigArgs) error

type SqueezeResponse

type SqueezeResponse struct {
	Data  *SqueezeResult `json:"data"`
	Error string         `json:"error"`
}

type SqueezeResult

type SqueezeResult struct {
	ID         uint32         `json:"id"`
	AgentStats []SqueezeStats `json:"agent_stats"`
	Result     interface{}    `json:"result"`
}

type SqueezeStats

type SqueezeStats struct {
	Addr   string `json:"addr"`
	Status int32  `json:"status"`
	Error  string `json:"error"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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