service

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2017 License: Apache-2.0 Imports: 22 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:

TasksRequest
Task
TasksReply
ServiceListRequest
ServiceListReply
ServiceListEntry
ServiceEntity
ServiceInspectRequest
ServiceInspectReply
ServiceScaleRequest

Package service is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	RoleLabel          = "io.amp.role"
	LatestTag          = "latest"
	GlobalMode         = "global"
	ReplicatedMode     = "replicated"
	StackNameLabelName = "com.docker.stack.namespace"
)

Service constants

Variables

This section is empty.

Functions

func RegisterServiceHandler added in v0.4.0

func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterServiceHandler registers the http handlers for service Service to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterServiceHandlerFromEndpoint added in v0.4.0

func RegisterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterServiceHandlerFromEndpoint is same as RegisterServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterServiceServer

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

Types

type Server added in v0.10.0

type Server struct {
	Accounts accounts.Interface
	Docker   *docker.Docker
	Stacks   stacks.Interface
}

Server is used to implement ServiceServer

func (*Server) InspectService added in v0.12.0

func (s *Server) InspectService(ctx context.Context, in *ServiceInspectRequest) (*ServiceInspectReply, error)

InspectService inspects a service

func (*Server) ListService added in v0.12.0

func (s *Server) ListService(ctx context.Context, in *ServiceListRequest) (*ServiceListReply, error)

ListService implements service.ListService

func (*Server) ScaleService added in v0.12.0

func (s *Server) ScaleService(ctx context.Context, in *ServiceScaleRequest) (*empty.Empty, error)

ScaleService scales a service

func (*Server) Tasks added in v0.10.0

func (s *Server) Tasks(ctx context.Context, in *TasksRequest) (*TasksReply, error)

Tasks implements service.Containers

type ServiceClient

type ServiceClient interface {
	Tasks(ctx context.Context, in *TasksRequest, opts ...grpc.CallOption) (*TasksReply, error)
	ListService(ctx context.Context, in *ServiceListRequest, opts ...grpc.CallOption) (*ServiceListReply, error)
	InspectService(ctx context.Context, in *ServiceInspectRequest, opts ...grpc.CallOption) (*ServiceInspectReply, error)
	ScaleService(ctx context.Context, in *ServiceScaleRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
}

func NewServiceClient

func NewServiceClient(cc *grpc.ClientConn) ServiceClient

type ServiceEntity added in v0.12.0

type ServiceEntity struct {
	Id    string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Mode  string `protobuf:"bytes,3,opt,name=mode" json:"mode,omitempty"`
	Image string `protobuf:"bytes,4,opt,name=image" json:"image,omitempty"`
	Tag   string `protobuf:"bytes,5,opt,name=tag" json:"tag,omitempty"`
}

func (*ServiceEntity) Descriptor added in v0.12.0

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

func (*ServiceEntity) GetId added in v0.12.0

func (m *ServiceEntity) GetId() string

func (*ServiceEntity) GetImage added in v0.12.0

func (m *ServiceEntity) GetImage() string

func (*ServiceEntity) GetMode added in v0.12.0

func (m *ServiceEntity) GetMode() string

func (*ServiceEntity) GetName added in v0.12.0

func (m *ServiceEntity) GetName() string

func (*ServiceEntity) GetTag added in v0.12.0

func (m *ServiceEntity) GetTag() string

func (*ServiceEntity) ProtoMessage added in v0.12.0

func (*ServiceEntity) ProtoMessage()

func (*ServiceEntity) Reset added in v0.12.0

func (m *ServiceEntity) Reset()

func (*ServiceEntity) String added in v0.12.0

func (m *ServiceEntity) String() string

type ServiceInspectReply added in v0.12.0

type ServiceInspectReply struct {
	ServiceEntity string `protobuf:"bytes,1,opt,name=service_entity,json=serviceEntity" json:"service_entity,omitempty"`
}

func (*ServiceInspectReply) Descriptor added in v0.12.0

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

func (*ServiceInspectReply) GetServiceEntity added in v0.12.0

func (m *ServiceInspectReply) GetServiceEntity() string

func (*ServiceInspectReply) ProtoMessage added in v0.12.0

func (*ServiceInspectReply) ProtoMessage()

func (*ServiceInspectReply) Reset added in v0.12.0

func (m *ServiceInspectReply) Reset()

func (*ServiceInspectReply) String added in v0.12.0

func (m *ServiceInspectReply) String() string

type ServiceInspectRequest added in v0.12.0

type ServiceInspectRequest struct {
	ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId" json:"service_id,omitempty"`
}

func (*ServiceInspectRequest) Descriptor added in v0.12.0

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

func (*ServiceInspectRequest) GetServiceId added in v0.12.0

func (m *ServiceInspectRequest) GetServiceId() string

func (*ServiceInspectRequest) ProtoMessage added in v0.12.0

func (*ServiceInspectRequest) ProtoMessage()

func (*ServiceInspectRequest) Reset added in v0.12.0

func (m *ServiceInspectRequest) Reset()

func (*ServiceInspectRequest) String added in v0.12.0

func (m *ServiceInspectRequest) String() string

type ServiceListEntry added in v0.12.0

type ServiceListEntry struct {
	Service     *ServiceEntity `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"`
	FailedTasks int32          `protobuf:"varint,2,opt,name=failed_tasks,json=failedTasks" json:"failed_tasks,omitempty"`
	ReadyTasks  int32          `protobuf:"varint,3,opt,name=ready_tasks,json=readyTasks" json:"ready_tasks,omitempty"`
	TotalTasks  int32          `protobuf:"varint,4,opt,name=total_tasks,json=totalTasks" json:"total_tasks,omitempty"`
	Status      string         `protobuf:"bytes,5,opt,name=status" json:"status,omitempty"`
}

func (*ServiceListEntry) Descriptor added in v0.12.0

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

func (*ServiceListEntry) GetFailedTasks added in v0.12.0

func (m *ServiceListEntry) GetFailedTasks() int32

func (*ServiceListEntry) GetReadyTasks added in v0.12.0

func (m *ServiceListEntry) GetReadyTasks() int32

func (*ServiceListEntry) GetService added in v0.12.0

func (m *ServiceListEntry) GetService() *ServiceEntity

func (*ServiceListEntry) GetStatus added in v0.12.0

func (m *ServiceListEntry) GetStatus() string

func (*ServiceListEntry) GetTotalTasks added in v0.12.0

func (m *ServiceListEntry) GetTotalTasks() int32

func (*ServiceListEntry) ProtoMessage added in v0.12.0

func (*ServiceListEntry) ProtoMessage()

func (*ServiceListEntry) Reset added in v0.12.0

func (m *ServiceListEntry) Reset()

func (*ServiceListEntry) String added in v0.12.0

func (m *ServiceListEntry) String() string

type ServiceListReply added in v0.12.0

type ServiceListReply struct {
	Entries []*ServiceListEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
}

func (*ServiceListReply) Descriptor added in v0.12.0

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

func (*ServiceListReply) GetEntries added in v0.12.0

func (m *ServiceListReply) GetEntries() []*ServiceListEntry

func (*ServiceListReply) ProtoMessage added in v0.12.0

func (*ServiceListReply) ProtoMessage()

func (*ServiceListReply) Reset added in v0.12.0

func (m *ServiceListReply) Reset()

func (*ServiceListReply) String added in v0.12.0

func (m *ServiceListReply) String() string

type ServiceListRequest added in v0.12.0

type ServiceListRequest struct {
	StackName string `protobuf:"bytes,1,opt,name=stack_name,json=stackName" json:"stack_name,omitempty"`
}

func (*ServiceListRequest) Descriptor added in v0.12.0

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

func (*ServiceListRequest) GetStackName added in v0.12.0

func (m *ServiceListRequest) GetStackName() string

func (*ServiceListRequest) ProtoMessage added in v0.12.0

func (*ServiceListRequest) ProtoMessage()

func (*ServiceListRequest) Reset added in v0.12.0

func (m *ServiceListRequest) Reset()

func (*ServiceListRequest) String added in v0.12.0

func (m *ServiceListRequest) String() string

type ServiceScaleRequest added in v0.12.0

type ServiceScaleRequest struct {
	ServiceId      string `protobuf:"bytes,1,opt,name=service_id,json=serviceId" json:"service_id,omitempty"`
	ReplicasNumber uint64 `protobuf:"varint,2,opt,name=replicas_number,json=replicasNumber" json:"replicas_number,omitempty"`
}

func (*ServiceScaleRequest) Descriptor added in v0.12.0

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

func (*ServiceScaleRequest) GetReplicasNumber added in v0.12.0

func (m *ServiceScaleRequest) GetReplicasNumber() uint64

func (*ServiceScaleRequest) GetServiceId added in v0.12.0

func (m *ServiceScaleRequest) GetServiceId() string

func (*ServiceScaleRequest) ProtoMessage added in v0.12.0

func (*ServiceScaleRequest) ProtoMessage()

func (*ServiceScaleRequest) Reset added in v0.12.0

func (m *ServiceScaleRequest) Reset()

func (*ServiceScaleRequest) String added in v0.12.0

func (m *ServiceScaleRequest) String() string

type Task added in v0.10.0

type Task struct {
	Id           string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Image        string `protobuf:"bytes,2,opt,name=image" json:"image,omitempty"`
	CurrentState string `protobuf:"bytes,3,opt,name=current_state,json=currentState" json:"current_state,omitempty"`
	DesiredState string `protobuf:"bytes,4,opt,name=desired_state,json=desiredState" json:"desired_state,omitempty"`
	NodeId       string `protobuf:"bytes,5,opt,name=node_id,json=nodeId" json:"node_id,omitempty"`
	Error        string `protobuf:"bytes,6,opt,name=error" json:"error,omitempty"`
}

func (*Task) Descriptor added in v0.10.0

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

func (*Task) GetCurrentState added in v0.12.0

func (m *Task) GetCurrentState() string

func (*Task) GetDesiredState added in v0.10.0

func (m *Task) GetDesiredState() string

func (*Task) GetError added in v0.12.0

func (m *Task) GetError() string

func (*Task) GetId added in v0.10.0

func (m *Task) GetId() string

func (*Task) GetImage added in v0.10.0

func (m *Task) GetImage() string

func (*Task) GetNodeId added in v0.10.0

func (m *Task) GetNodeId() string

func (*Task) ProtoMessage added in v0.10.0

func (*Task) ProtoMessage()

func (*Task) Reset added in v0.10.0

func (m *Task) Reset()

func (*Task) String added in v0.10.0

func (m *Task) String() string

type TasksReply added in v0.10.0

type TasksReply struct {
	Tasks []*Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"`
}

func (*TasksReply) Descriptor added in v0.10.0

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

func (*TasksReply) GetTasks added in v0.10.0

func (m *TasksReply) GetTasks() []*Task

func (*TasksReply) ProtoMessage added in v0.10.0

func (*TasksReply) ProtoMessage()

func (*TasksReply) Reset added in v0.10.0

func (m *TasksReply) Reset()

func (*TasksReply) String added in v0.10.0

func (m *TasksReply) String() string

type TasksRequest added in v0.10.0

type TasksRequest struct {
	ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId" json:"service_id,omitempty"`
}

func (*TasksRequest) Descriptor added in v0.10.0

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

func (*TasksRequest) GetServiceId added in v0.10.0

func (m *TasksRequest) GetServiceId() string

func (*TasksRequest) ProtoMessage added in v0.10.0

func (*TasksRequest) ProtoMessage()

func (*TasksRequest) Reset added in v0.10.0

func (m *TasksRequest) Reset()

func (*TasksRequest) String added in v0.10.0

func (m *TasksRequest) String() string

Jump to

Keyboard shortcuts

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