service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package service is a generated protocol buffer package.

It is generated from these files:

github.com/appcelerator/amp/api/rpc/service/service.proto

It has these top-level messages:

ServiceSpec
NetworkAttachment
PublishSpec
ReplicatedService
GlobalService
ServiceCreateRequest
ServiceCreateResponse
RemoveRequest
RemoveResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterServiceServer

func RegisterServiceServer(s *grpc.Server, srv ServiceServer)

Types

type GlobalService

type GlobalService struct {
}

func (*GlobalService) Descriptor

func (*GlobalService) Descriptor() ([]byte, []int)

func (*GlobalService) ProtoMessage

func (*GlobalService) ProtoMessage()

func (*GlobalService) Reset

func (m *GlobalService) Reset()

func (*GlobalService) String

func (m *GlobalService) String() string

type NetworkAttachment

type NetworkAttachment struct {
	Target  string   `protobuf:"bytes,1,opt,name=target" json:"target,omitempty"`
	Aliases []string `protobuf:"bytes,2,rep,name=aliases" json:"aliases,omitempty"`
}

func ParseNetwork

func ParseNetwork(s string) *NetworkAttachment

ParseNetwork parses a string and returns a NetworkAttachement

func (*NetworkAttachment) Descriptor

func (*NetworkAttachment) Descriptor() ([]byte, []int)

func (*NetworkAttachment) ProtoMessage

func (*NetworkAttachment) ProtoMessage()

func (*NetworkAttachment) Reset

func (m *NetworkAttachment) Reset()

func (*NetworkAttachment) String

func (m *NetworkAttachment) String() string

type PublishSpec

type PublishSpec struct {
	Name         string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Protocol     string `protobuf:"bytes,2,opt,name=protocol" json:"protocol,omitempty"`
	PublishPort  uint32 `protobuf:"varint,3,opt,name=publish_port,json=publishPort" json:"publish_port,omitempty"`
	InternalPort uint32 `protobuf:"varint,4,opt,name=internal_port,json=internalPort" json:"internal_port,omitempty"`
}

func ParsePublishSpec

func ParsePublishSpec(s string) (publishSpec PublishSpec, err error)

ParsePublishSpec parses a string and returns a PublishSpec

func (*PublishSpec) Descriptor

func (*PublishSpec) Descriptor() ([]byte, []int)

func (*PublishSpec) ProtoMessage

func (*PublishSpec) ProtoMessage()

func (*PublishSpec) Reset

func (m *PublishSpec) Reset()

func (*PublishSpec) String

func (m *PublishSpec) String() string

type RemoveRequest

type RemoveRequest struct {
	Ident string `protobuf:"bytes,1,opt,name=ident" json:"ident,omitempty"`
}

func (*RemoveRequest) Descriptor

func (*RemoveRequest) Descriptor() ([]byte, []int)

func (*RemoveRequest) ProtoMessage

func (*RemoveRequest) ProtoMessage()

func (*RemoveRequest) Reset

func (m *RemoveRequest) Reset()

func (*RemoveRequest) String

func (m *RemoveRequest) String() string

type RemoveResponse

type RemoveResponse struct {
	Ident string `protobuf:"bytes,1,opt,name=ident" json:"ident,omitempty"`
}

func (*RemoveResponse) Descriptor

func (*RemoveResponse) Descriptor() ([]byte, []int)

func (*RemoveResponse) ProtoMessage

func (*RemoveResponse) ProtoMessage()

func (*RemoveResponse) Reset

func (m *RemoveResponse) Reset()

func (*RemoveResponse) String

func (m *RemoveResponse) String() string

type ReplicatedService

type ReplicatedService struct {
	Replicas uint64 `protobuf:"varint,1,opt,name=replicas" json:"replicas,omitempty"`
}

func (*ReplicatedService) Descriptor

func (*ReplicatedService) Descriptor() ([]byte, []int)

func (*ReplicatedService) ProtoMessage

func (*ReplicatedService) ProtoMessage()

func (*ReplicatedService) Reset

func (m *ReplicatedService) Reset()

func (*ReplicatedService) String

func (m *ReplicatedService) String() string

type Service

type Service struct {
	Docker *client.Client
}

Service is used to implement ServiceServer

func (*Service) Create

Create uses docker api to create a service

func (*Service) Remove

func (s *Service) Remove(ctx context.Context, req *RemoveRequest) (*RemoveResponse, error)

Remove implements ServiceServer

type ServiceClient

type ServiceClient interface {
	Create(ctx context.Context, in *ServiceCreateRequest, opts ...grpc.CallOption) (*ServiceCreateResponse, error)
	Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*RemoveResponse, error)
}

func NewServiceClient

func NewServiceClient(cc *grpc.ClientConn) ServiceClient

type ServiceCreateRequest

type ServiceCreateRequest struct {
	ServiceSpec *ServiceSpec `protobuf:"bytes,1,opt,name=service_spec,json=serviceSpec" json:"service_spec,omitempty"`
}

func (*ServiceCreateRequest) Descriptor

func (*ServiceCreateRequest) Descriptor() ([]byte, []int)

func (*ServiceCreateRequest) GetServiceSpec

func (m *ServiceCreateRequest) GetServiceSpec() *ServiceSpec

func (*ServiceCreateRequest) ProtoMessage

func (*ServiceCreateRequest) ProtoMessage()

func (*ServiceCreateRequest) Reset

func (m *ServiceCreateRequest) Reset()

func (*ServiceCreateRequest) String

func (m *ServiceCreateRequest) String() string

type ServiceCreateResponse

type ServiceCreateResponse struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*ServiceCreateResponse) Descriptor

func (*ServiceCreateResponse) Descriptor() ([]byte, []int)

func (*ServiceCreateResponse) ProtoMessage

func (*ServiceCreateResponse) ProtoMessage()

func (*ServiceCreateResponse) Reset

func (m *ServiceCreateResponse) Reset()

func (*ServiceCreateResponse) String

func (m *ServiceCreateResponse) String() string

type ServiceSpec

type ServiceSpec struct {
	Image string `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	// Types that are valid to be assigned to Mode:
	//	*ServiceSpec_Replicated
	//	*ServiceSpec_Global
	Mode            isServiceSpec_Mode   `protobuf_oneof:"mode"`
	Env             []string             `protobuf:"bytes,5,rep,name=env" json:"env,omitempty"`
	Networks        []*NetworkAttachment `protobuf:"bytes,6,rep,name=networks" json:"networks,omitempty"`
	Labels          map[string]string    `` /* 132-byte string literal not displayed */
	ContainerLabels map[string]string    `` /* 173-byte string literal not displayed */
	PublishSpecs    []*PublishSpec       `protobuf:"bytes,9,rep,name=publish_specs,json=publishSpecs" json:"publish_specs,omitempty"`
	Args            []string             `protobuf:"bytes,10,rep,name=args" json:"args,omitempty"`
	Mounts          []string             `protobuf:"bytes,11,rep,name=mounts" json:"mounts,omitempty"`
}

func (*ServiceSpec) Descriptor

func (*ServiceSpec) Descriptor() ([]byte, []int)

func (*ServiceSpec) GetContainerLabels

func (m *ServiceSpec) GetContainerLabels() map[string]string

func (*ServiceSpec) GetGlobal

func (m *ServiceSpec) GetGlobal() *GlobalService

func (*ServiceSpec) GetLabels

func (m *ServiceSpec) GetLabels() map[string]string

func (*ServiceSpec) GetMode

func (m *ServiceSpec) GetMode() isServiceSpec_Mode

func (*ServiceSpec) GetNetworks

func (m *ServiceSpec) GetNetworks() []*NetworkAttachment

func (*ServiceSpec) GetPublishSpecs

func (m *ServiceSpec) GetPublishSpecs() []*PublishSpec

func (*ServiceSpec) GetReplicated

func (m *ServiceSpec) GetReplicated() *ReplicatedService

func (*ServiceSpec) ProtoMessage

func (*ServiceSpec) ProtoMessage()

func (*ServiceSpec) Reset

func (m *ServiceSpec) Reset()

func (*ServiceSpec) String

func (m *ServiceSpec) String() string

func (*ServiceSpec) XXX_OneofFuncs

func (*ServiceSpec) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type ServiceSpec_Global

type ServiceSpec_Global struct {
	Global *GlobalService `protobuf:"bytes,4,opt,name=global,oneof"`
}

type ServiceSpec_Replicated

type ServiceSpec_Replicated struct {
	Replicated *ReplicatedService `protobuf:"bytes,3,opt,name=replicated,oneof"`
}

type SwarmMode

type SwarmMode isServiceSpec_Mode

SwarmMode is needed to export isServiceSpec_Mode type, which consumers can use to create a variable and assign either a ServiceSpec_Replicated or ServiceSpec_Global struct

Jump to

Keyboard shortcuts

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