daemon

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect added in v0.0.7

func Connect(callback func(ctx context.Context, c proto.MidgardClient))

Connect connects to a midgard client

Types

type Daemon

type Daemon struct {
	sync.Mutex

	ID string

	proto.UnimplementedMidgardServer
	// contains filtered or unexported fields
}

Daemon is the midgard daemon that interact with midgard server.

func NewDaemon

func NewDaemon() *Daemon

NewDaemon creates a new midgard daemon

func (*Daemon) AllocateURL

AllocateURL request the midgard server to allocate a given URL for a given resource, or the content from the midgard universal clipboard.

func (*Daemon) CodeToImage

func (m *Daemon) CodeToImage(ctx context.Context, in *proto.CodeToImageInput) (out *proto.CodeToImageOutput, err error)

CodeToImage tries to create an image for the given code.

func (*Daemon) ListDaemons

func (m *Daemon) ListDaemons(ctx context.Context, in *proto.ListDaemonsInput) (out *proto.ListDaemonsOutput, err error)

ListDaemons lists all active daemons.

func (*Daemon) Ping

func (m *Daemon) Ping(ctx context.Context, in *proto.PingInput) (*proto.PingOutput, error)

Ping response a pong

func (*Daemon) Run added in v0.0.9

func (m *Daemon) Run(ctx context.Context) (onStart, onStop func() error)

Run runs Daemon daemon: 1. maintaining midgard daemon rpc; 2. maintaining midgard daemon to server websocket.

func (*Daemon) Serve

func (m *Daemon) Serve(ctx context.Context)

Serve serves Daemon daemon: 1. maintaining midgard daemon rpc; 2. maintaining midgard daemon to server websocket.

Jump to

Keyboard shortcuts

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