temporalink

package module
v0.0.0-...-a11d0c8 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 11 Imported by: 0

README

Inspired by temporalite and copy/pasted heavily from temporalio/cli, this library allows you to run a Temporal instance embedded with your application. This is experimental and not intended for production workloads.

Example

Install the metrics dependency and the temporalink package:

$ go get go.opentelemetry.io/otel/sdk/metric@v0.39.0
$ go get github.com/bmorton/temporalink

Then run a server:

package main

import (
	"context"
	"fmt"

	"github.com/bmorton/temporalink"
)

func main() {
	ip := "0.0.0.0"
	serverPort := 7233
	uiPort := 8080

	s, err := temporalink.NewEmbeddedTemporal(ip, serverPort, uiPort)
	if err != nil {
		panic(err)
	}

	if err := s.Start(context.Background()); err != nil {
		fmt.Printf("error while starting server: %s\n", err)
	}
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmbeddedTemporal

type EmbeddedTemporal struct {
	IP         string
	ServerPort int
	UIPort     int
	// contains filtered or unexported fields
}

func NewEmbeddedTemporal

func NewEmbeddedTemporal(ip string, serverPort int, uiPort int) (*EmbeddedTemporal, error)

func (*EmbeddedTemporal) Start

func (et *EmbeddedTemporal) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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