MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / NewInstance

Function NewInstance

pkg/management/postgres/instance.go:446–455  ·  view source on GitHub ↗

NewInstance creates a new Instance object setting the defaults

()

Source from the content-addressed store, hash-verified

444
445// NewInstance creates a new Instance object setting the defaults
446func NewInstance() *Instance {
447 return &Instance{
448 SocketDirectory: postgres.SocketDirectory,
449 instanceCommandChan: make(chan InstanceCommand),
450 slotsReplicatorChan: make(chan *apiv1.ReplicationSlotsConfiguration),
451 roleSynchronizerChan: make(chan *apiv1.ManagedConfiguration),
452 tablespaceSynchronizerChan: make(chan map[string]apiv1.TablespaceConfiguration),
453 SessionID: string(uuid.NewUUID()),
454 }
455}
456
457// WithNamespace specifies the namespace for this Instance
458func (instance *Instance) WithNamespace(namespace string) *Instance {

Callers 14

cache_test.goFile · 0.92
NewCmdFunction · 0.92
NewCmdFunction · 0.92
NewCmdFunction · 0.92
runnable_test.goFile · 0.92
runnable_test.goFile · 0.92
instance_test.goFile · 0.70

Calls

no outgoing calls

Tested by 1