http_server

package
v0.0.0-...-841f565 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(store ark.Store, logger logz.FieldLogger, broker cqrs.Broker, logFilePath string) *fiber.App

New creates a new fiber server and storage interface

func NewSubsystem

func NewSubsystem(addr, logFile string, store ark.Store, logger logz.FieldLogger, broker cqrs.Broker) *subsystems.Process

NewSubsystem stands up an http_server as a subsystem

Types

type Client

type Client interface {
	AddTarget(target ark.RawTarget) (ark.RawArtifact, error)
	GetTargets() ([]ark.RawTarget, error)
	ConnectTargets(edge ark.GraphEdge) (ark.GraphEdge, error)
	GetGraph() (*dag.AcyclicGraph, error)
	GetGraphEdges() ([]ark.GraphEdge, error)
	Run(cmd messages.GraphRunnerExecuteCommand) (messages.GraphRunnerExecuteCommandResponse, error)
	GetServerLogs() (io.Reader, error)
	GetLogsByKey(logKey string) (io.Reader, error)
}

Client represent a struct

func NewClient

func NewClient(baseURL string) Client

NewClient creates a new pointer to a gentleman http client

type ClientGentleman

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

ClientGentleman defines the gentleman.ClientGentleman to be passed around

func (ClientGentleman) AddTarget

func (c ClientGentleman) AddTarget(target ark.RawTarget) (ark.RawArtifact, error)

AddTarget adds a target to the database using the http client

func (ClientGentleman) ConnectTargets

func (c ClientGentleman) ConnectTargets(edge ark.GraphEdge) (ark.GraphEdge, error)

ConnectTargets connects the nodes in the graph

func (ClientGentleman) GetGraph

func (c ClientGentleman) GetGraph() (*dag.AcyclicGraph, error)

GetGraph retrieves the graph from the database

func (ClientGentleman) GetGraphEdges

func (c ClientGentleman) GetGraphEdges() ([]ark.GraphEdge, error)

GetGraphEdges retrieves all of the graph edges from the database

func (ClientGentleman) GetLogsByKey

func (c ClientGentleman) GetLogsByKey(logKey string) (io.Reader, error)

GetLogsByKey streams logs for a specific target's key

func (ClientGentleman) GetServerLogs

func (c ClientGentleman) GetServerLogs() (io.Reader, error)

GetServerLogs streams all server logs

func (ClientGentleman) GetTargets

func (c ClientGentleman) GetTargets() ([]ark.RawTarget, error)

GetTargets gets all of the targets from the database and returns them as a slice of ark.Targets

func (ClientGentleman) Run

Run execute targets

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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