ruby

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChoriaPlugin

func ChoriaPlugin() plugin.Pluggable

ChoriaPlugin produces the plugin for choria

func NewRubyAgent

func NewRubyAgent(ddl *agent.DDL, mgr server.AgentManager) (*mcorpc.Agent, error)

NewRubyAgent creates a shim agent that calls to a old mcollective agent implemented in ruby

Types

type Provider

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

Provider is a Agent Provider capable of executing old mcollective ruby agents

func New

func New(fw *choria.Framework) *Provider

New creates a new provider that will find ruby agents in the configured libdirs

func (*Provider) Agents

func (p *Provider) Agents() []*agent.DDL

Agents provides a list of loaded agent DDLs

func (*Provider) Initialize

func (p *Provider) Initialize(fw *choria.Framework, log *logrus.Entry)

Initialize configures the agent provider

func (*Provider) PluginInstance

func (p *Provider) PluginInstance() interface{}

PluginInstance implements plugin.Pluggable

func (*Provider) PluginName

func (p *Provider) PluginName() string

PluginName implements plugin.Pluggable

func (*Provider) PluginType

func (p *Provider) PluginType() plugin.Type

PluginType implements plugin.Pluggable

func (*Provider) PluginVersion

func (p *Provider) PluginVersion() string

PluginVersion implements plugin.Pluggable

func (*Provider) RegisterAgents

func (p *Provider) RegisterAgents(ctx context.Context, mgr server.AgentManager, connector choria.InstanceConnector, log *logrus.Entry) error

RegisterAgents registers known ruby agents using a shimm agent

func (*Provider) Version

func (p *Provider) Version() string

Version reports the version for this provider

type ShimRequest

type ShimRequest struct {
	Agent      string           `json:"agent"`
	Action     string           `json:"action"`
	RequestID  string           `json:"requestid"`
	SenderID   string           `json:"senderid"`
	CallerID   string           `json:"callerid"`
	Collective string           `json:"collective"`
	TTL        int              `json:"ttl"`
	Time       int64            `json:"msgtime"`
	Body       *ShimRequestBody `json:"body"`
}

ShimRequest is the request being published to the shim runner

type ShimRequestBody

type ShimRequestBody struct {
	Agent  string          `json:"agent"`
	Action string          `json:"action"`
	Data   json.RawMessage `json:"data"`
	Caller string          `json:"caller"`
}

ShimRequestBody is the body passed to the

Jump to

Keyboard shortcuts

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