Documentation ¶
Index ¶
- Constants
- Variables
- func DeleteEnv(as *aerospike.Client, env string) error
- func EnvExists(as *aerospike.Client, env string) (exists bool, err error)
- func InitServiceTable(as *aerospike.Client) error
- func NewAerospike() (as *aerospike.Client, err error)
- func NewEnv(as *aerospike.Client, env string, description string) error
- func NewService(as *aerospike.Client, env string, service string, description string, ...) error
- func NewServiceCodeVersion(as *aerospike.Client, env string, service string) (newVersion int64, err error)
- func ServiceExists(as *aerospike.Client, env string, service string) (exists bool, err error)
- func ServiceServingData(as *aerospike.Client, env string, service string) (servingID string, liveVersion int64, isPublic bool, err error)
- func SetServiceLiveCodeVersion(as *aerospike.Client, env string, service string, version int64) (err error)
- func UpdateService(as *aerospike.Client, env string, service string, description string, ...) (err error)
- type EnvData
- type ServiceData
Constants ¶
View Source
const PackageName = "store"
PackageName is the name of this package.
Variables ¶
View Source
var ( // AerospikeFromConsulFlag indicates whether Consul should be used to get // an Aerospike client. AerospikeFromConsulFlag = config.DeclareBool( PackageName, "aerospikeFromConsul") // AerospikeFixedAddrFlag indicates a fixed address which is used if // AerospikeFromConsulFlag is false. AerospikeFixedAddrFlag = config.DeclareString( PackageName, "aerospikeFixedAddr", "leverosaerospike:3000") )
Functions ¶
func InitServiceTable ¶
InitServiceTable initializes the indices for the service table.
func NewAerospike ¶
NewAerospike returns a new Aerospike client.
func NewService ¶
func NewService( as *aerospike.Client, env string, service string, description string, isPublic bool) error
NewService stores a new service.
func NewServiceCodeVersion ¶
func NewServiceCodeVersion( as *aerospike.Client, env string, service string) ( newVersion int64, err error)
NewServiceCodeVersion generates a version number of the code and returns it.
func ServiceExists ¶
ServiceExists returns true iff the service exists.
func ServiceServingData ¶
func ServiceServingData( as *aerospike.Client, env string, service string) ( servingID string, liveVersion int64, isPublic bool, err error)
ServiceServingData retrieves information about how to serve the code for this service.
Note: This function is used on the hot path of RPC serving.
Types ¶
type EnvData ¶
type EnvData struct {
Description string `as:"Description"`
}
EnvData is the data associated with the env and stored in the database.
type ServiceData ¶
type ServiceData struct { Env string `as:"Env"` UniqueID string `as:"ID"` Description string `as:"Desc"` NextCodeVersion int64 `as:"NextVer"` LiveCodeVersion int64 `as:"LiveVer"` IsPublic bool `as:"IsPub"` }
ServiceData is the data associated with the service and stored in the database.
Click to show internal directories.
Click to hide internal directories.