varasto: github.com/function61/varasto/pkg/restartcontroller Index | Files

package restartcontroller

import "github.com/function61/varasto/pkg/restartcontroller"

Wrapper for running a restartable fn. it gets its restart signal via context cancellation

Index

Package Files

restartcontroller.go

type Controller Uses

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

func New Uses

func New(logger *log.Logger) *Controller

func (*Controller) Restart Uses

func (r *Controller) Restart() error

returns immediately

func (*Controller) Run Uses

func (r *Controller) Run(ctx context.Context, run func(ctx context.Context) error) error

Package restartcontroller imports 4 packages (graph) and is imported by 1 packages. Updated 2020-03-27. Refresh now. Tools for package owners.