model

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDomainProject

func GetDomainProject(resource interface{}) (domainProject string)

Types

type Instance

type Instance struct {
	DomainProject string
	Host          string
	Endpoints     []string
	Environment   string
	AppId         string
	ServiceName   string
	Version       string
	Framework     *registry.FrameWorkProperty
	Lease         int64 // seconds
	Timestamp     int64 // the seconds from 0 to now
}

func (*Instance) Age

func (s *Instance) Age() time.Duration

func (*Instance) SetLease

func (s *Instance) SetLease(hc *registry.HealthCheck)

func (*Instance) UpdateTimestamp

func (s *Instance) UpdateTimestamp(t string)

type Service

type Service struct {
	DomainProject string
	Environment   string
	AppId         string
	ServiceName   string
	Versions      []string
	Frameworks    []*registry.FrameWorkProperty
	Endpoints     []string
	Timestamp     int64 // the seconds from 0 to now
}

func (*Service) Age

func (s *Service) Age() time.Duration

func (*Service) AppendEndpoints

func (s *Service) AppendEndpoints(endpoints []string)

func (*Service) AppendFramework

func (s *Service) AppendFramework(property *registry.FrameWorkProperty)

func (*Service) AppendVersion

func (s *Service) AppendVersion(v string)

func (*Service) UpdateTimestamp

func (s *Service) UpdateTimestamp(t string)

Jump to

Keyboard shortcuts

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