RoadRunner API
RR API consists of 2 parts:
- Plugin interfaces.
- Proto API for the PHP clients, at the moment released as V1Beta.
Plugins should depend only on this repo, but not on each other. For example:
package foo
import (
"github.com/roadrunner-server/api/v2/plugins/config"
)
type Plugin struct {}
func (p *Plugin) Init(cfg config.Configurer) error {
return nil
}
Here as you see, our package foo
depends only on the api
repository, thus you can easily switch between implementations.
ALL protobuf API located here: Buf
To install and use generated packages:
go get go.buf.build/protocolbuffers/go/roadrunner-server/api
Proto API used for the external integrations for the RPC (mostly) or as the internal communications. For example:
package foo
import (
jobsv1 "go.buf.build/protocolbuffers/go/roadrunner-server/api"
)
func Push(in *jobsv1.PushRequest, out *jobsv1.Empty) error {
return nil
}
Here is the method used in the RR to accept the Job
from the external system.
You may also navigate to the DOCS
tab and inspect the full API.