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: 0

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