pipeflow

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerUrl string
	Client    *httpclient.HttpClient
	HostIp    string
	Port      int
	DataDir   string
	Token     string
}

func NewPipeFlowConfig

func NewPipeFlowConfig(options *Options) (*Config, error)

NewPipeFlowConfig creates a new pipeflow config

type ExecRequest

type ExecRequest struct {
	Command    string `json:"command"`
	Executable string `json:"executable"`
}

type ExecResponse

type ExecResponse struct {
	Status int
	Stderr string
	Stdin  string
	Stdout string
}

type Options

type Options struct {
	HostIp    string
	Port      int
	DataDir   string
	ServerUrl string
}

type RegisterNodeRequest

type RegisterNodeRequest struct {
	Hostname string `json:"hostname"`
	HostIp   string `json:"hostIp"`
	Port     int    `json:"port"`
}

type RegisterPipeFlowNodeTokenRequest

type RegisterPipeFlowNodeTokenRequest struct {
	Token string `json:"token"`
}

type Server

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

func NewPipeFlowServer

func NewPipeFlowServer(config *Config) (*Server, error)

func (*Server) AuthMiddleware

func (s *Server) AuthMiddleware() gin.HandlerFunc

AuthMiddleware is the middleware for authentication

func (*Server) Exec

func (s *Server) Exec(c *gin.Context)

func (*Server) PipeFlowToken

func (s *Server) PipeFlowToken(c *gin.Context)

PipeFlowToken Set the token of the PipeFlow node

func (*Server) RegisterNode

func (s *Server) RegisterNode() error

RegisterNode Register after starting pipeflow

func (*Server) Run

func (s *Server) Run()

Run starts the server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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