
                            S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  \R                  " \R                  R                  \R                  R                  5       " S	 S
\R                  5      5       rg)z%gcloud pubsub emulator start command.    )absolute_import)division)unicode_literals)arg_parsers)base)pubsub_util)utilc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Start   a6  Start a local pubsub emulator.

This command starts a local pubsub emulator.

On successful start up, you should expect to see:

```
...
[pubsub] This is the Google Pub/Sub fake.
[pubsub] Implementation may be incomplete or differ from the real system.
...
[pubsub] INFO: Server started, listening on 8538
```
EXAMPLESzK
To start a local pubsub emulator, run:

  $ {command} --data-dir=DATA-DIR
c                 *    U R                  SSS SS9  g )Nz--host-portFc                 >    [         R                  R                  U SS9$ NT)ipv6_enabled)r   HostPortParse)args    %lib/surface/emulators/pubsub/start.py<lambda>Start.Args.<locals>.<lambda>9   s    --33Cd3K    zUThe host:port to which the emulator should be bound. The default value is [::1]:8085.)requiredtypehelp)add_argument)parsers    r   Args
Start.Args4   s#    
K$	  %r   c                    UR                   (       dE  [        R                  R                  [        R
                  " [        R                  5      SS9Ul         [        R                  " U5       n[        R                  " [        R                  " U5      UR                  5        [        R                  " U[        R                  5        S S S 5        g ! , (       d  f       g = fr   )	host_portr   r   r   r	   GetHostPortr   PUBSUBr   WriteEnvYamlGetEnvdata_dirPrefixOutput)selfargspubsub_processs      r   Run	Start.Run>   s    >>"++11$2B2B


3,0 2 2dn 
		4	 N
**40$--@
(:(:; 
!	 	 s   -AC
C N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r+   __static_attributes__r-   r   r   r   r      s1       - % %<r   r   N)r2   
__future__r   r   r   googlecloudsdk.callioper   r   $googlecloudsdk.command_lib.emulatorsr   r	   ReleaseTracksReleaseTrackALPHABETACommandr   r-   r   r   <module>r>      sd    , &  ' / ( < 5 D%%++T->->-C-CD)<DLL )< E)<r   