github.com/gramework/gramework@v1.8.1-0.20231027140105-82555c9057f5/infrastructure/infrastructure_New.go (about)

     1  package infrastructure
     2  
     3  import (
     4  	"sync"
     5  	"time"
     6  )
     7  
     8  // New initializes an empty infrastructure
     9  func New() *Infrastructure {
    10  	return &Infrastructure{
    11  		Lock:            new(sync.RWMutex),
    12  		Services:        make(map[string]*Service),
    13  		UpdateTimestamp: time.Now().UnixNano(),
    14  	}
    15  }