cloudstate

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Overview

Package cloudstate implements the Cloudstate event sourced and entity discovery protocol.

Index

Constants

This section is empty.

Variables

View Source
var (
	// optional bool entity_key = 50002;
	E_EntityKey = &file_cloudstate_entity_key_proto_extTypes[0]
)

Extension fields to descriptor.FieldOptions.

View Source
var File_cloudstate_entity_key_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CloudState

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

CloudState is an instance of a Cloudstate User Function.

func New

func New(c protocol.Config) (*CloudState, error)

New returns a new CloudState instance.

func (*CloudState) RegisterCRDT added in v0.2.0

func (cs *CloudState) RegisterCRDT(entity *crdt.Entity, config protocol.DescriptorConfig) error

RegisterCRDT registers a CRDT entity.

func (*CloudState) RegisterEventSourced added in v0.2.0

func (cs *CloudState) RegisterEventSourced(entity *eventsourced.Entity, config protocol.DescriptorConfig) error

RegisterEventSourced registers an event sourced entity.

func (*CloudState) Run

func (cs *CloudState) Run() error

Run runs the CloudState instance on the interface and port defined by the HOST and PORT environment variable.

func (*CloudState) RunWithListener added in v0.2.0

func (cs *CloudState) RunWithListener(lis net.Listener) error

Run runs the CloudState instance with a listener provided.

func (*CloudState) Stop added in v0.2.0

func (cs *CloudState) Stop()

Stop gracefully stops the Cloudstate instance.

Directories

Path Synopsis
Package crdt implements the Cloudstate CRDT state model support.
Package crdt implements the Cloudstate CRDT state model support.
Package discovery implements the Cloudstate entity discovery server.
Package discovery implements the Cloudstate entity discovery server.
Package encoding implements the cloudstate Any encoding support.
Package encoding implements the cloudstate Any encoding support.
Package eventsourced implements the Cloudstate eventsourcing state model.
Package eventsourced implements the Cloudstate eventsourcing state model.

Jump to

Keyboard shortcuts

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