group

package
v0.0.0-...-a355528 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adapt

func Adapt(rpcClient rpc_client.Client) group.Plugin

Adapt returns a group Plugin implementation based on given rpc client. Assumption here is that the rpcClient has been verified to support the group plugin RPC interface.

func NewClient

func NewClient(socketPath string) (group.Plugin, error)

NewClient returns a plugin interface implementation connected to a remote plugin

Types

type CommitGroupRequest

type CommitGroupRequest struct {
	Spec    group.Spec
	Pretend bool
}

CommitGroupRequest is the rpc wrapper for input to commit a group

func (CommitGroupRequest) Plugin

func (r CommitGroupRequest) Plugin() (plugin.Name, error)

Plugin implements pkg/rpc/internal/Addressable

type CommitGroupResponse

type CommitGroupResponse struct {
	ID      group.ID
	Details string
}

CommitGroupResponse is the rpc wrapper for the results to commit a group

type DescribeGroupRequest

type DescribeGroupRequest struct {
	ID group.ID
}

DescribeGroupRequest is the rpc wrapper for the input to inspect a group

func (DescribeGroupRequest) Plugin

func (r DescribeGroupRequest) Plugin() (plugin.Name, error)

Plugin implements pkg/rpc/internal/Addressable

type DescribeGroupResponse

type DescribeGroupResponse struct {
	ID          group.ID
	Description group.Description
}

DescribeGroupResponse is the rpc wrapper for the results from inspecting a group

type DestroyGroupRequest

type DestroyGroupRequest struct {
	ID group.ID
}

DestroyGroupRequest is the rpc wrapper for the input to destroy a group

func (DestroyGroupRequest) Plugin

func (r DestroyGroupRequest) Plugin() (plugin.Name, error)

Plugin implements pkg/rpc/internal/Addressable

type DestroyGroupResponse

type DestroyGroupResponse struct {
	ID group.ID
}

DestroyGroupResponse is the rpc wrapper for the output from destroying a group

type DestroyInstancesRequest

type DestroyInstancesRequest struct {
	ID        group.ID
	Instances []instance.ID
}

DestroyInstancesRequest is the rpc wrapper for the input to destroy instances

func (DestroyInstancesRequest) Plugin

func (r DestroyInstancesRequest) Plugin() (plugin.Name, error)

Plugin implements pkg/rpc/internal/Addressable

type DestroyInstancesResponse

type DestroyInstancesResponse struct {
	ID group.ID
}

DestroyInstancesResponse is the rpc wrapper for the output from destroy instances

type FreeGroupRequest

type FreeGroupRequest struct {
	ID group.ID
}

FreeGroupRequest is the rpc wrapper for input to free a group

func (FreeGroupRequest) Plugin

func (r FreeGroupRequest) Plugin() (plugin.Name, error)

Plugin implements pkg/rpc/internal/Addressable

type FreeGroupResponse

type FreeGroupResponse struct {
	ID group.ID
}

FreeGroupResponse is the rpc wrapper for the results to free a group

type Group

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

Group the exported type needed to conform to json-rpc call convention

func PluginServer

func PluginServer(p group.Plugin) *Group

PluginServer returns a RPCService that conforms to the net/rpc rpc call convention.

func PluginServerWithGroups

func PluginServerWithGroups(list func() (map[group.ID]group.Plugin, error)) *Group

PluginServerWithGroups returns a Group map of plugins by group.ID

func (*Group) CommitGroup

func (p *Group) CommitGroup(_ *http.Request, req *CommitGroupRequest, resp *CommitGroupResponse) error

CommitGroup is the rpc method to commit a group

func (*Group) DescribeGroup

func (p *Group) DescribeGroup(_ *http.Request, req *DescribeGroupRequest, resp *DescribeGroupResponse) error

DescribeGroup is the rpc method to describe a group

func (*Group) DestroyGroup

func (p *Group) DestroyGroup(_ *http.Request, req *DestroyGroupRequest, resp *DestroyGroupResponse) error

DestroyGroup is the rpc method to destroy a group

func (*Group) DestroyInstances

func (p *Group) DestroyInstances(_ *http.Request, req *DestroyInstancesRequest, resp *DestroyInstancesResponse) error

DestroyInstances is the rpc method to destroy specific instances

func (*Group) ExampleProperties

func (p *Group) ExampleProperties() *types.Any

ExampleProperties returns an example properties used by the plugin

func (*Group) FreeGroup

func (p *Group) FreeGroup(_ *http.Request, req *FreeGroupRequest, resp *FreeGroupResponse) error

FreeGroup is the rpc method to free a group

func (*Group) ImplementedInterface

func (p *Group) ImplementedInterface() spi.InterfaceSpec

ImplementedInterface returns the interface implemented by this RPC service.

func (*Group) InspectGroups

func (p *Group) InspectGroups(_ *http.Request, req *InspectGroupsRequest, resp *InspectGroupsResponse) error

InspectGroups is the rpc method to inspect groups

func (*Group) SetSize

func (p *Group) SetSize(_ *http.Request, req *SetSizeRequest, resp *SetSizeResponse) error

SetSize is the rpc method to set the group target size

func (*Group) Size

func (p *Group) Size(_ *http.Request, req *SizeRequest, resp *SizeResponse) error

Size is the rpc method to get the group target size

func (*Group) Types

func (p *Group) Types() []string

Types returns the types exposed by this kind of RPC service

func (*Group) VendorInfo

func (p *Group) VendorInfo() *spi.VendorInfo

VendorInfo returns a metadata object about the plugin, if the plugin implements it. See plugin.Vendor

type InspectGroupsRequest

type InspectGroupsRequest struct {
	ID group.ID
}

InspectGroupsRequest is the rpc wrapper for the input to inspect groups

func (InspectGroupsRequest) Plugin

func (r InspectGroupsRequest) Plugin() (plugin.Name, error)

Plugin implements pkg/rpc/internal/Addressable

type InspectGroupsResponse

type InspectGroupsResponse struct {
	ID     group.ID
	Groups []group.Spec
}

InspectGroupsResponse is the rpc wrapper for the output from inspecting groups

type SetSizeRequest

type SetSizeRequest struct {
	ID   group.ID
	Size int
}

SetSizeRequest is the rpc wrapper for the getting size

func (SetSizeRequest) Plugin

func (r SetSizeRequest) Plugin() (plugin.Name, error)

Plugin implements pkg/rpc/internal/Addressable

type SetSizeResponse

type SetSizeResponse struct {
	ID group.ID
}

SetSizeResponse is the rpc wrapper for the output of sizefrom destroy instances

type SizeRequest

type SizeRequest struct {
	ID group.ID
}

SizeRequest is the rpc wrapper for the getting size

func (SizeRequest) Plugin

func (r SizeRequest) Plugin() (plugin.Name, error)

Plugin implements pkg/rpc/internal/Addressable

type SizeResponse

type SizeResponse struct {
	ID   group.ID
	Size int
}

SizeResponse is the rpc wrapper for the output of sizefrom destroy instances

Jump to

Keyboard shortcuts

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