stack

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2017 License: Apache-2.0 Imports: 31 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:

StackFileRequest
StackRequest
RemoveRequest
StackReply
ListRequest
ListReply
TasksRequest
TasksReply
StackInfo
StackID
CustomNetwork
IdList
NetworkSpec
NetworkIPAM
NetworkIPAMConfig
Stack

Package stack is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

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 RegisterStackServiceHandler added in v0.4.0

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

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

func RegisterStackServiceHandlerFromEndpoint added in v0.4.0

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

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

func RegisterStackServiceServer

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

Types

type CustomNetwork added in v0.2.0

type CustomNetwork struct {
	Id          string       `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	OwnerNumber int32        `protobuf:"varint,2,opt,name=owner_number,json=ownerNumber" json:"owner_number,omitempty"`
	Data        *NetworkSpec `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
}

struct to store network info in ETCD

func (*CustomNetwork) Descriptor added in v0.2.0

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

func (*CustomNetwork) GetData added in v0.2.0

func (m *CustomNetwork) GetData() *NetworkSpec

func (*CustomNetwork) GetId added in v0.4.0

func (m *CustomNetwork) GetId() string

func (*CustomNetwork) GetOwnerNumber added in v0.4.0

func (m *CustomNetwork) GetOwnerNumber() int32

func (*CustomNetwork) ProtoMessage added in v0.2.0

func (*CustomNetwork) ProtoMessage()

func (*CustomNetwork) Reset added in v0.2.0

func (m *CustomNetwork) Reset()

func (*CustomNetwork) String added in v0.2.0

func (m *CustomNetwork) String() string

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) GetList added in v0.4.0

func (m *IdList) GetList() []string

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 {
	All   bool  `protobuf:"varint,1,opt,name=all" json:"all,omitempty"`
	Limit int64 `protobuf:"varint,2,opt,name=limit" json:"limit,omitempty"`
}

struct for list request function

func (*ListRequest) Descriptor

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

func (*ListRequest) GetAll added in v0.4.0

func (m *ListRequest) GetAll() bool

func (*ListRequest) GetLimit added in v0.4.0

func (m *ListRequest) GetLimit() int64

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) String

func (m *ListRequest) String() string

type NetworkIPAM added in v0.2.0

type NetworkIPAM struct {
	Driver  string               `protobuf:"bytes,1,opt,name=driver" json:"driver,omitempty"`
	Options map[string]string    `` /* 134-byte string literal not displayed */
	Config  []*NetworkIPAMConfig `protobuf:"bytes,3,rep,name=config" json:"config,omitempty"`
}

func (*NetworkIPAM) Descriptor added in v0.2.0

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

func (*NetworkIPAM) GetConfig added in v0.2.0

func (m *NetworkIPAM) GetConfig() []*NetworkIPAMConfig

func (*NetworkIPAM) GetDriver added in v0.4.0

func (m *NetworkIPAM) GetDriver() string

func (*NetworkIPAM) GetOptions added in v0.2.0

func (m *NetworkIPAM) GetOptions() map[string]string

func (*NetworkIPAM) ProtoMessage added in v0.2.0

func (*NetworkIPAM) ProtoMessage()

func (*NetworkIPAM) Reset added in v0.2.0

func (m *NetworkIPAM) Reset()

func (*NetworkIPAM) String added in v0.2.0

func (m *NetworkIPAM) String() string

type NetworkIPAMConfig added in v0.2.0

type NetworkIPAMConfig struct {
	Subnet     string            `protobuf:"bytes,1,opt,name=subnet" json:"subnet,omitempty"`
	IpRange    string            `protobuf:"bytes,2,opt,name=ip_range,json=ipRange" json:"ip_range,omitempty"`
	Gateway    string            `protobuf:"bytes,3,opt,name=gateway" json:"gateway,omitempty"`
	AuxAddress map[string]string `` /* 158-byte string literal not displayed */
}

func (*NetworkIPAMConfig) Descriptor added in v0.2.0

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

func (*NetworkIPAMConfig) GetAuxAddress added in v0.2.0

func (m *NetworkIPAMConfig) GetAuxAddress() map[string]string

func (*NetworkIPAMConfig) GetGateway added in v0.4.0

func (m *NetworkIPAMConfig) GetGateway() string

func (*NetworkIPAMConfig) GetIpRange added in v0.4.0

func (m *NetworkIPAMConfig) GetIpRange() string

func (*NetworkIPAMConfig) GetSubnet added in v0.4.0

func (m *NetworkIPAMConfig) GetSubnet() string

func (*NetworkIPAMConfig) ProtoMessage added in v0.2.0

func (*NetworkIPAMConfig) ProtoMessage()

func (*NetworkIPAMConfig) Reset added in v0.2.0

func (m *NetworkIPAMConfig) Reset()

func (*NetworkIPAMConfig) String added in v0.2.0

func (m *NetworkIPAMConfig) String() string

type NetworkSpec added in v0.2.0

type NetworkSpec struct {
	Name       string            `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Driver     string            `protobuf:"bytes,2,opt,name=driver" json:"driver,omitempty"`
	EnableIpv6 bool              `protobuf:"varint,3,opt,name=enable_ipv6,json=enableIpv6" json:"enable_ipv6,omitempty"`
	Ipam       *NetworkIPAM      `protobuf:"bytes,4,opt,name=ipam" json:"ipam,omitempty"`
	Internal   bool              `protobuf:"varint,5,opt,name=internal" json:"internal,omitempty"`
	Options    map[string]string `` /* 134-byte string literal not displayed */
	Labels     map[string]string `` /* 132-byte string literal not displayed */
	External   string            `protobuf:"bytes,8,opt,name=external" json:"external,omitempty"`
}

func (*NetworkSpec) Descriptor added in v0.2.0

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

func (*NetworkSpec) GetDriver added in v0.4.0

func (m *NetworkSpec) GetDriver() string

func (*NetworkSpec) GetEnableIpv6 added in v0.4.0

func (m *NetworkSpec) GetEnableIpv6() bool

func (*NetworkSpec) GetExternal added in v0.4.0

func (m *NetworkSpec) GetExternal() string

func (*NetworkSpec) GetInternal added in v0.4.0

func (m *NetworkSpec) GetInternal() bool

func (*NetworkSpec) GetIpam added in v0.2.0

func (m *NetworkSpec) GetIpam() *NetworkIPAM

func (*NetworkSpec) GetLabels added in v0.2.0

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

func (*NetworkSpec) GetName added in v0.4.0

func (m *NetworkSpec) GetName() string

func (*NetworkSpec) GetOptions added in v0.2.0

func (m *NetworkSpec) GetOptions() map[string]string

func (*NetworkSpec) ProtoMessage added in v0.2.0

func (*NetworkSpec) ProtoMessage()

func (*NetworkSpec) Reset added in v0.2.0

func (m *NetworkSpec) Reset()

func (*NetworkSpec) String added in v0.2.0

func (m *NetworkSpec) 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) GetForce added in v0.4.0

func (m *RemoveRequest) GetForce() bool

func (*RemoveRequest) GetStackIdent added in v0.4.0

func (m *RemoveRequest) GetStackIdent() string

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
	StateMachine state.Machine
}

Server is used to implement stack.StackService

func NewServer added in v0.4.0

func NewServer(store storage.Interface, docker *client.Client) (s *Server)

NewServer instantiates a server

func (*Server) Create added in v0.2.1

func (s *Server) Create(ctx context.Context, in *StackFileRequest) (*StackReply, error)

Create implements stack.ServerService Create

func (*Server) Get added in v0.4.0

func (s *Server) Get(ctx context.Context, in *StackRequest) (out *StackFileRequest, err error)

Get implements stack.ServerService Get

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 Start

func (*Server) Stop

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

Stop implements stack.ServerService Stop

func (*Server) Tasks added in v0.4.0

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

Tasks list the tasks of a service

func (*Server) Up

func (s *Server) Up(ctx context.Context, in *StackFileRequest) (*StackReply, 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"`
	Networks []*NetworkSpec         `protobuf:"bytes,4,rep,name=networks" json:"networks,omitempty"`
	IsPublic bool                   `protobuf:"varint,5,opt,name=is_public,json=isPublic" json:"is_public,omitempty"`
}

Stack struct

func ParseStackfile

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

ParseStackfile main function to parse stackfile

func (*Stack) Descriptor

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

func (*Stack) GetId added in v0.4.0

func (m *Stack) GetId() string

func (*Stack) GetIsPublic added in v0.4.0

func (m *Stack) GetIsPublic() bool

func (*Stack) GetName added in v0.4.0

func (m *Stack) GetName() string

func (*Stack) GetNetworks added in v0.2.0

func (m *Stack) GetNetworks() []*NetworkSpec

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 StackFileRequest added in v0.2.1

type StackFileRequest struct {
	Stack *Stack `protobuf:"bytes,1,opt,name=stack" json:"stack,omitempty"`
}

struct for stackfile request

func (*StackFileRequest) Descriptor added in v0.2.1

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

func (*StackFileRequest) GetStack added in v0.4.0

func (m *StackFileRequest) GetStack() *Stack

func (*StackFileRequest) ProtoMessage added in v0.2.1

func (*StackFileRequest) ProtoMessage()

func (*StackFileRequest) Reset added in v0.2.1

func (m *StackFileRequest) Reset()

func (*StackFileRequest) String added in v0.2.1

func (m *StackFileRequest) 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) GetId added in v0.4.0

func (m *StackID) GetId() string

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) GetId added in v0.4.0

func (m *StackInfo) GetId() string

func (*StackInfo) GetName added in v0.4.0

func (m *StackInfo) GetName() string

func (*StackInfo) GetState added in v0.4.0

func (m *StackInfo) GetState() string

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 stack id responses

func (*StackReply) Descriptor

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

func (*StackReply) GetStackId added in v0.4.0

func (m *StackReply) GetStackId() string

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 stack name/id based requests

func (*StackRequest) Descriptor

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

func (*StackRequest) GetStackIdent added in v0.4.0

func (m *StackRequest) GetStackIdent() string

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 *StackFileRequest, opts ...grpc.CallOption) (*StackReply, error)
	Create(ctx context.Context, in *StackFileRequest, opts ...grpc.CallOption) (*StackReply, 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)
	Get(ctx context.Context, in *StackRequest, opts ...grpc.CallOption) (*StackFileRequest, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error)
	Tasks(ctx context.Context, in *TasksRequest, opts ...grpc.CallOption) (*TasksReply, 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 TasksReply added in v0.4.0

type TasksReply struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

struct for tasks reply function

func (*TasksReply) Descriptor added in v0.4.0

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

func (*TasksReply) GetMessage added in v0.4.0

func (m *TasksReply) GetMessage() string

func (*TasksReply) ProtoMessage added in v0.4.0

func (*TasksReply) ProtoMessage()

func (*TasksReply) Reset added in v0.4.0

func (m *TasksReply) Reset()

func (*TasksReply) String added in v0.4.0

func (m *TasksReply) String() string

type TasksRequest added in v0.4.0

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

struct for tasks request function

func (*TasksRequest) Descriptor added in v0.4.0

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

func (*TasksRequest) GetStackIdent added in v0.4.0

func (m *TasksRequest) GetStackIdent() string

func (*TasksRequest) ProtoMessage added in v0.4.0

func (*TasksRequest) ProtoMessage()

func (*TasksRequest) Reset added in v0.4.0

func (m *TasksRequest) Reset()

func (*TasksRequest) String added in v0.4.0

func (m *TasksRequest) String() string

Jump to

Keyboard shortcuts

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