All Projects → adwpc → pagent

adwpc / pagent

Licence: MIT license
child process agent by golang

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to pagent

Pkuremote
A port rewritting utility to modify the source or destination port for packets on Windows.
Stars: ✭ 185 (+927.78%)
Mutual labels:  agent
Ec2 Plugin
Jenkins ec2 plugin
Stars: ✭ 246 (+1266.67%)
Mutual labels:  agent
libmem
Advanced Game Hacking Library for C/C++, Rust and Python (Windows/Linux/FreeBSD) (Process/Memory Hacking) (Hooking/Detouring) (Cross Platform) (x86/x64/ARM/ARM64) (DLL/SO Injection) (Internal/External)
Stars: ✭ 336 (+1766.67%)
Mutual labels:  process
Pinpoint C Agent
It is an agent written by C++, PHP, python languages. And we hope to support other languages by this agent. Until now, it supports [PHP],[C/C++] and [PYTHON].
Stars: ✭ 188 (+944.44%)
Mutual labels:  agent
Recaf
The modern Java bytecode editor
Stars: ✭ 3,374 (+18644.44%)
Mutual labels:  agent
pi-web-agent
The project that won the university challenge at HackManchester 2013. A web based desktop replacement for our beloved Raspberry PI's
Stars: ✭ 87 (+383.33%)
Mutual labels:  agent
Simple rl
A simple framework for experimenting with Reinforcement Learning in Python.
Stars: ✭ 179 (+894.44%)
Mutual labels:  agent
pinpoint-node-agent
Pinpoint Node.js agent
Stars: ✭ 45 (+150%)
Mutual labels:  agent
Learningx
Deep & Classical Reinforcement Learning + Machine Learning Examples in Python
Stars: ✭ 241 (+1238.89%)
Mutual labels:  agent
king-pong
Deep Reinforcement Learning Pong Agent, King Pong, he's the best
Stars: ✭ 23 (+27.78%)
Mutual labels:  agent
Xnumon
monitor macOS for malicious activity
Stars: ✭ 188 (+944.44%)
Mutual labels:  agent
Opensteer
OpenSteer is a C++ library to help build steering behaviors for autonomous characters in games and animation.
Stars: ✭ 202 (+1022.22%)
Mutual labels:  agent
snmpman
Easy massive SNMP-agent simulation with the use of simple YAML files
Stars: ✭ 28 (+55.56%)
Mutual labels:  agent
Myperf4j
High performance Java APM. Powered by ASM. Try it. Test it. If you feel its better, use it.
Stars: ✭ 2,281 (+12572.22%)
Mutual labels:  agent
dodoc
Conçu pour favoriser les processus réflexifs lors d’activités d’apprentissage, do•doc est un outil ouvert et modulaire qui permet de capturer des médias (photos, vidéos, sons et stop-motion), de les éditer, de les mettre en page et de les publier
Stars: ✭ 51 (+183.33%)
Mutual labels:  process
Http2 Wrapper
Use HTTP2 the same way like HTTP1
Stars: ✭ 183 (+916.67%)
Mutual labels:  agent
Ingraind
Data first monitoring agent using (e)BPF, built on RedBPF
Stars: ✭ 251 (+1294.44%)
Mutual labels:  agent
fast-laravel
基于Swoole的高性能HTTP服务器,加速您Laravel应用程序。
Stars: ✭ 33 (+83.33%)
Mutual labels:  process
docker-azure-pipelines-agent
Azure DevOps Agent Docker Images. Based on this: https://github.com/microsoft/vsts-agent-docker
Stars: ✭ 20 (+11.11%)
Mutual labels:  agent
opsbro
Ops Best friend
Stars: ✭ 37 (+105.56%)
Mutual labels:  agent

pagent

Build Status

pagent is a child process agent, with a focus on being:

  • simple: child and parent process communicate with stdin and stdout
  • secure: Multi-Process is safe than Multi-Thread/Multi-Goroutine
  • decoupling your biz code with callback func

demo

package main

import (
    "fmt"
    "time"

    "github.com/adwpc/pagent"
)

type MyBiz struct {
    pagent.Master
}

func NewBiz() *MyBiz {
    return &MyBiz{}
}

func (a *MyBiz) BizRunning(id, str string) error {
    fmt.Println("[MyBiz BizRunning] str=" + str)
    return nil
}

func (a *MyBiz) BizFinish(id string, err error) error {
    fmt.Println("[MyBiz BizFinish] id=" + id)
    return err
}

func main() {
    a := NewBiz()

    fmt.Println("worker1-------------------------")
    a.GetWorker("worker1").Start("bash", a.BizRunning, a.BizFinish)
    a.GetWorker("worker1").Input("ls")
    time.Sleep(1 * time.Second)
    a.DelWorker("worker1")

    fmt.Println("worker2-------------------------")
    a.GetWorker("worker2").Start("ifconfig", nil, a.BizFinish)
    time.Sleep(1 * time.Second)
    a.DelWorker("worker2")

    fmt.Printf("end!----------------------------")
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].