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.
Proto API used for the external integrations for the RPC (mostly) or as the internal communications. For example:
package foo
import (
jobsv1beta "github.com/roadrunner-server/api/v2/proto/jobs/v1beta"
)
func Push(in *jobsv1beta.PushRequest, out *jobsv1beta.Empty) error {
return nil
}
Here is the method used in the RR to accept the Job
from the external system.