deploy

package
v1.0.3 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: 14 Imported by: 0

Documentation

Overview

Copyright 2016 Google Inc.

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. /////////////////////////////////////////////////////////////////////////

Copyright 2016 Google Inc.

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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigSource

type ConfigSource struct {
	Swagger *string `yaml:"swagger"`
	Host    *string `yaml:"host"`
	Name    *string `yaml:"name"`
	Type    *string `yaml:"type"`
}

ConfigSource provides minimal schema for YAML config

type Service

type Service struct {
	Name            string
	Version         string
	CredentialsFile string
	ProducerProject string
	// contains filtered or unexported fields
}

Service handler for the API

func (*Service) Await

func (s *Service) Await(op *mgmt.Operation) *mgmt.Operation

Await polls for completion of the operation

func (*Service) AwaitDone

func (s *Service) AwaitDone(op *mgmt.Operation) error

AwaitDone polls and checks for the completion

func (*Service) Connect

func (s *Service) Connect() (err error)

Connect to service management service

func (*Service) Create

func (s *Service) Create() error

Create a service with a given name

func (*Service) CreateConfigFiles

func (s *Service) CreateConfigFiles(files []string) ([]*mgmt.ConfigFile, error)

CreateConfigFiles loads files and returns config sources and updates the service name if it can be extracted

func (*Service) Delete

func (s *Service) Delete() error

Delete service by name

func (*Service) Deploy

func (s *Service) Deploy(files []string, defaultName string) (*mgmt.Service, error)

Deploy service configuration files and ensure it is ready to be consumed Use defaultName to provide default service name for default service configuration

func (*Service) Enable

func (s *Service) Enable(name, project string) error

Enable a managed service for a consumer project

func (*Service) Ensure

func (s *Service) Ensure() error

Ensure that the service exists and has dependencies enabled

func (*Service) Exists

func (s *Service) Exists() bool

Exists checks if service name is registered

func (*Service) Fetch

func (s *Service) Fetch() (svc *mgmt.Service, err error)

Fetch service configuration from the handler

func (*Service) GenerateConfigReport

func (s *Service) GenerateConfigReport() (*mgmt.GenerateConfigReportResponse, error)

GenerateConfigReport computes the diff between config IDs

func (*Service) GetClient

func (s *Service) GetClient(scope string) (hc *http.Client, err error)

GetClient with given scope

func (*Service) Rollout

func (s *Service) Rollout() error

Rollout pushes the config the backend services

func (*Service) Submit

func (s *Service) Submit(configFiles []*mgmt.ConfigFile) (*mgmt.Service, error)

Submit creates a service config from config sources

func (*Service) Undelete

func (s *Service) Undelete() error

Undelete service by name

Jump to

Keyboard shortcuts

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