NewInstance creates a new Instance object setting the defaults
()
| 444 | |
| 445 | // NewInstance creates a new Instance object setting the defaults |
| 446 | func 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 |
| 458 | func (instance *Instance) WithNamespace(namespace string) *Instance { |
no outgoing calls