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 CustomNetwork IdList NetworkSpec NetworkIPAM NetworkIPAMConfig Stack
Index ¶
- Variables
- func RegisterStackServiceServer(s *grpc.Server, srv StackServiceServer)
- type CustomNetwork
- type IdList
- type ListReply
- type ListRequest
- type NetworkIPAM
- type NetworkIPAMConfig
- type NetworkSpec
- func (*NetworkSpec) Descriptor() ([]byte, []int)
- func (m *NetworkSpec) GetIpam() *NetworkIPAM
- func (m *NetworkSpec) GetLabels() map[string]string
- func (m *NetworkSpec) GetOptions() map[string]string
- func (*NetworkSpec) ProtoMessage()
- func (m *NetworkSpec) Reset()
- func (m *NetworkSpec) String() string
- type RemoveRequest
- type Server
- func (s *Server) List(ctx context.Context, in *ListRequest) (*ListReply, error)
- func (s *Server) Remove(ctx context.Context, in *RemoveRequest) (*StackReply, error)
- func (s *Server) Start(ctx context.Context, in *StackRequest) (*StackReply, error)
- func (s *Server) Stop(ctx context.Context, in *StackRequest) (*StackReply, error)
- func (s *Server) Up(ctx context.Context, in *UpRequest) (*UpReply, error)
- type Stack
- type StackID
- type StackInfo
- type StackReply
- type StackRequest
- type StackServiceClient
- type StackServiceServer
- type StackState
- type UpReply
- type UpRequest
Constants ¶
This section is empty.
Variables ¶
var StackRuleSet = state.RuleSet{ StackState_Stopped.String(): { StackState_Stopped.String(): false, StackState_Starting.String(): true, StackState_Running.String(): false, StackState_Redeploying.String(): true, }, StackState_Starting.String(): { StackState_Stopped.String(): false, StackState_Starting.String(): false, StackState_Running.String(): true, StackState_Redeploying.String(): false, }, StackState_Running.String(): { StackState_Stopped.String(): true, StackState_Starting.String(): false, StackState_Running.String(): false, StackState_Redeploying.String(): true, }, StackState_Redeploying.String(): { StackState_Stopped.String(): true, StackState_Starting.String(): true, StackState_Running.String(): false, StackState_Redeploying.String(): false, }, }
StackRuleSet defines possible transitions for stack states
var StackState_name = map[int32]string{
0: "Stopped",
1: "Starting",
2: "Running",
3: "Redeploying",
}
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 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) 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) ProtoMessage ¶
func (*IdList) ProtoMessage()
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) ProtoMessage ¶
func (*ListReply) ProtoMessage()
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) 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) 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) 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) 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) 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) ProtoMessage ¶
func (*RemoveRequest) ProtoMessage()
func (*RemoveRequest) Reset ¶
func (m *RemoveRequest) Reset()
func (*RemoveRequest) String ¶
func (m *RemoveRequest) String() string
type Server ¶
Server is used to implement stack.StackService
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
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 (*Stack) Descriptor ¶
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()
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) ProtoMessage ¶
func (*StackID) ProtoMessage()
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) ProtoMessage ¶
func (*StackInfo) ProtoMessage()
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 StackServiceServer ¶
type StackServiceServer interface { Up(context.Context, *UpRequest) (*UpReply, error) Start(context.Context, *StackRequest) (*StackReply, error) Stop(context.Context, *StackRequest) (*StackReply, error) Remove(context.Context, *RemoveRequest) (*StackReply, error) List(context.Context, *ListRequest) (*ListReply, error) }
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) ProtoMessage ¶
func (*UpReply) ProtoMessage()
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) ProtoMessage ¶
func (*UpRequest) ProtoMessage()