storage

package
v0.0.0-...-bc7948d Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright © 2016 Nuxeo SA (http://nuxeo.com/) and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	TIME_FORMAT = "2006-01-02 15:04:05"
)

Variables

This section is empty.

Functions

func GetDomainFromNode

func GetDomainFromNode(node *etcd.Node) (*Domain, error)

func GetServiceFromPath

func GetServiceFromPath(servicePath string, kapi etcd.KeysAPI) (*Service, error)

func NewDomain

func NewDomain(domainNode *etcd.Node) (*Domain, error)

func NewStatus

func NewStatus(service *Service, node *etcd.Node) *Status

func SetServicePrefix

func SetServicePrefix(servicePrefix string)

Types

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

Watcher implements the PersistenceDriver interface of the Arken Model and allows to store the model in etcd.

func NewWatcher

func NewWatcher(client etcd.KeysAPI, servicePrefix string, domainPrefix string) *Watcher

func (*Watcher) DestroyDomain

func (w *Watcher) DestroyDomain(d *Domain) error

func (*Watcher) DestroyService

func (w *Watcher) DestroyService(sc *Service) error

func (*Watcher) Init

func (w *Watcher) Init()

Init Domains and Services.

func (*Watcher) Listen

func (w *Watcher) Listen() chan *ModelEvent

func (*Watcher) LoadAllDomains

func (w *Watcher) LoadAllDomains() (map[string]*Domain, error)

func (*Watcher) LoadAllServices

func (w *Watcher) LoadAllServices() (map[string]*Service, error)

func (*Watcher) LoadDomain

func (w *Watcher) LoadDomain(domainName string) (*Domain, error)

func (*Watcher) LoadService

func (w *Watcher) LoadService(serviceName string) (*Service, error)

func (*Watcher) PersistDomain

func (w *Watcher) PersistDomain(d *Domain) (*Domain, error)

func (*Watcher) PersistService

func (w *Watcher) PersistService(s *Service) (*Service, error)

Jump to

Keyboard shortcuts

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