stack

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package stack is a generated protocol buffer package.

It is generated from these files:

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

It has these top-level messages:

UpRequest
UpReply
StackRequest
RemoveRequest
StackReply
ListRequest
ListReply
StackInfo
StackID
IdList
Stack

Index

Constants

This section is empty.

Variables

StackRuleSet defines possible transitions for stack states

View Source
var StackState_name = map[int32]string{
	0: "Stopped",
	1: "Starting",
	2: "Running",
	3: "Redeploying",
}
View Source
var StackState_value = map[string]int32{
	"Stopped":     0,
	"Starting":    1,
	"Running":     2,
	"Redeploying": 3,
}

Functions

func RegisterStackServiceServer

func RegisterStackServiceServer(s *grpc.Server, srv StackServiceServer)

Types

type IdList

type IdList struct {
	List []string `protobuf:"bytes,1,rep,name=list" json:"list,omitempty"`
}

struct to store service id list in ETCD

func (*IdList) Descriptor

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

func (*IdList) ProtoMessage

func (*IdList) ProtoMessage()

func (*IdList) Reset

func (m *IdList) Reset()

func (*IdList) String

func (m *IdList) String() string

type ListReply

type ListReply struct {
	List []*StackInfo `protobuf:"bytes,1,rep,name=list" json:"list,omitempty"`
}

struct for list reply function

func (*ListReply) Descriptor

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

func (*ListReply) GetList

func (m *ListReply) GetList() []*StackInfo

func (*ListReply) ProtoMessage

func (*ListReply) ProtoMessage()

func (*ListReply) Reset

func (m *ListReply) Reset()

func (*ListReply) String

func (m *ListReply) String() string

type ListRequest

type ListRequest struct {
}

struct for list request function

func (*ListRequest) Descriptor

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

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) String

func (m *ListRequest) String() string

type RemoveRequest

type RemoveRequest struct {
	StackIdent string `protobuf:"bytes,1,opt,name=stack_ident,json=stackIdent" json:"stack_ident,omitempty"`
	Force      bool   `protobuf:"varint,2,opt,name=force" json:"force,omitempty"`
}

struct for remove request function

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 Server

type Server struct {
	Store  storage.Interface
	Docker *client.Client
}

Server is used to implement stack.StackService

func (*Server) List

func (s *Server) List(ctx context.Context, in *ListRequest) (*ListReply, error)

List list all available stack with there status

func (*Server) Remove

func (s *Server) Remove(ctx context.Context, in *RemoveRequest) (*StackReply, error)

Remove implements stack.ServerService Remove

func (*Server) Start

func (s *Server) Start(ctx context.Context, in *StackRequest) (*StackReply, error)

Start implements stack.ServerService Stop

func (*Server) Stop

func (s *Server) Stop(ctx context.Context, in *StackRequest) (*StackReply, error)

Stop implements stack.ServerService Stop

func (*Server) Up

func (s *Server) Up(ctx context.Context, in *UpRequest) (*UpReply, error)

Up implements stack.ServerService Up

type Stack

type Stack struct {
	Name     string                 `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Id       string                 `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
	Services []*service.ServiceSpec `protobuf:"bytes,3,rep,name=services" json:"services,omitempty"`
	IsPublic bool                   `protobuf:"varint,4,opt,name=is_public,json=isPublic" json:"is_public,omitempty"`
}

Stack struct

func ParseStackfile

func ParseStackfile(ctx context.Context, in string) (stack *Stack, err error)

ParseStackfile create a new stack from yaml

func (*Stack) Descriptor

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

func (*Stack) GetServices

func (m *Stack) GetServices() []*service.ServiceSpec

func (*Stack) ProtoMessage

func (*Stack) ProtoMessage()

func (*Stack) Reset

func (m *Stack) Reset()

func (*Stack) String

func (m *Stack) String() string

type StackID

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

struct to store Stack id in ETCD

func (*StackID) Descriptor

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

func (*StackID) ProtoMessage

func (*StackID) ProtoMessage()

func (*StackID) Reset

func (m *StackID) Reset()

func (*StackID) String

func (m *StackID) String() string

type StackInfo

type StackInfo struct {
	Name  string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Id    string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
	State string `protobuf:"bytes,3,opt,name=state" json:"state,omitempty"`
}

struct part of ListReply Struct

func (*StackInfo) Descriptor

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

func (*StackInfo) ProtoMessage

func (*StackInfo) ProtoMessage()

func (*StackInfo) Reset

func (m *StackInfo) Reset()

func (*StackInfo) String

func (m *StackInfo) String() string

type StackReply

type StackReply struct {
	StackId string `protobuf:"bytes,1,opt,name=stack_id,json=stackId" json:"stack_id,omitempty"`
}

struct for start, stop and remove reply functions

func (*StackReply) Descriptor

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

func (*StackReply) ProtoMessage

func (*StackReply) ProtoMessage()

func (*StackReply) Reset

func (m *StackReply) Reset()

func (*StackReply) String

func (m *StackReply) String() string

type StackRequest

type StackRequest struct {
	StackIdent string `protobuf:"bytes,1,opt,name=stack_ident,json=stackIdent" json:"stack_ident,omitempty"`
}

struct for start and stop request functions

func (*StackRequest) Descriptor

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

func (*StackRequest) ProtoMessage

func (*StackRequest) ProtoMessage()

func (*StackRequest) Reset

func (m *StackRequest) Reset()

func (*StackRequest) String

func (m *StackRequest) String() string

type StackServiceClient

type StackServiceClient interface {
	Up(ctx context.Context, in *UpRequest, opts ...grpc.CallOption) (*UpReply, error)
	Start(ctx context.Context, in *StackRequest, opts ...grpc.CallOption) (*StackReply, error)
	Stop(ctx context.Context, in *StackRequest, opts ...grpc.CallOption) (*StackReply, error)
	Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*StackReply, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error)
}

func NewStackServiceClient

func NewStackServiceClient(cc *grpc.ClientConn) StackServiceClient

type StackState

type StackState int32
const (
	StackState_Stopped     StackState = 0
	StackState_Starting    StackState = 1
	StackState_Running     StackState = 2
	StackState_Redeploying StackState = 3
)

func (StackState) EnumDescriptor

func (StackState) EnumDescriptor() ([]byte, []int)

func (StackState) String

func (x StackState) String() string

type UpReply

type UpReply struct {
	StackId string `protobuf:"bytes,1,opt,name=stack_id,json=stackId" json:"stack_id,omitempty"`
}

struct for up reply function

func (*UpReply) Descriptor

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

func (*UpReply) ProtoMessage

func (*UpReply) ProtoMessage()

func (*UpReply) Reset

func (m *UpReply) Reset()

func (*UpReply) String

func (m *UpReply) String() string

type UpRequest

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

struct for up request function

func (*UpRequest) Descriptor

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

func (*UpRequest) ProtoMessage

func (*UpRequest) ProtoMessage()

func (*UpRequest) Reset

func (m *UpRequest) Reset()

func (*UpRequest) String

func (m *UpRequest) String() string

Jump to

Keyboard shortcuts

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