state

package
v0.0.0-...-8ae5c4f Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const MONGO_URI = "MONGO_URI"

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Client dapr.Client
	DB     mongo.Collection
}

func New

func New(ctx context.Context, c dapr.Client) *Handler

func (*Handler) List

func (h *Handler) List(ctx context.Context, in *common.InvocationEvent) (out *common.Content, err error)

func (*Handler) Process

func (h *Handler) Process(ctx context.Context, e *common.TopicEvent) (retry bool, err error)

func (*Handler) Run

func (h *Handler) Run(ctx context.Context, in *common.InvocationEvent) (out *common.Content, err error)

type Run

type Run struct {
	ID          primitive.ObjectID  `bson:"_id,omitempty"`
	TimestampID string              `bson:"timestampid,omitempty"`
	RunID       string              `bson:"runid,omitempty"`
	Value       int                 `bson:"value,omitempty"`
	Stage       string              `bson:"stage,omitempty"`
	Timestamp   primitive.Timestamp `bson:"timestamp,omitempty"`
}

Jump to

Keyboard shortcuts

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