appruntimesync

package
v3.7.1-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2018 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package appruntimesync provides a grpc server and client code

This package is based on the resource status in Kubernete maintenance application status.

Server code demo:

ars := appruntimesync.CreateAppRuntimeSync(s.Config)
if err := ars.Start(); err != nil {
	return err
}
defer ars.Stop()
go ars.SyncStatus()

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppRuntimeSync

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

AppRuntimeSync app runtime sync modle handle app status and event

func CreateAppRuntimeSync

func CreateAppRuntimeSync(conf option.Config) *AppRuntimeSync

CreateAppRuntimeSync create app runtime sync model

func (*AppRuntimeSync) Start

func (a *AppRuntimeSync) Start(errchan chan error)

Start start if have master right start grpc server

func (*AppRuntimeSync) Stop

func (a *AppRuntimeSync) Stop() error

Stop stop app runtime sync server

Directories

Path Synopsis
Package client provides app runtime client code Client code demo: //create app status client ctx, cancel := context.WithCancel(context.Background()) defer cancel() cli, err := client.NewClient(ctx, client.AppRuntimeSyncClientConf{ EtcdEndpoints: s.Config.EtcdEndpoint, }) if err != nil { logrus.Errorf("create app status client error, %v", err) return err }
Package client provides app runtime client code Client code demo: //create app status client ctx, cancel := context.WithCancel(context.Background()) defer cancel() cli, err := client.NewClient(ctx, client.AppRuntimeSyncClientConf{ EtcdEndpoints: s.Config.EtcdEndpoint, }) if err != nil { logrus.Errorf("create app status client error, %v", err) return err }
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.
Package pod cache kubernetes pod in memory and db It handle local scheduler pod host ip info.
Package pod cache kubernetes pod in memory and db It handle local scheduler pod host ip info.
Package status check app status from kubernetes rc,statefulset and deployment It save app status to db and provides query
Package status check app status from kubernetes rc,statefulset and deployment It save app status to db and provides query

Jump to

Keyboard shortcuts

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