...

Source file src/golang.conradwood.net/apis/getestservice/create_5.go

Documentation: golang.conradwood.net/apis/getestservice

     1  // client create: CtxTestClient
     2  /*
     3    Created by /home/cnw/devel/go/yatools/src/golang.yacloud.eu/yatools/protoc-gen-cnw/protoc-gen-cnw.go
     4  */
     5  
     6  /* geninfo:
     7     rendererv : 2
     8     filename  : golang.conradwood.net/apis/getestservice/getestservice.proto
     9     gopackage : golang.conradwood.net/apis/getestservice
    10     importname: ai_4
    11     clientfunc: GetCtxTest
    12     serverfunc: NewCtxTest
    13     lookupfunc: CtxTestLookupID
    14     varname   : client_CtxTestClient_4
    15     clientname: CtxTestClient
    16     servername: CtxTestServer
    17     gsvcname  : getestservice.CtxTest
    18     lockname  : lock_CtxTestClient_4
    19     activename: active_CtxTestClient_4
    20  */
    21  
    22  package getestservice
    23  
    24  import (
    25     "sync"
    26     "golang.conradwood.net/go-easyops/client"
    27  )
    28  var (
    29    lock_CtxTestClient_4 sync.Mutex
    30    client_CtxTestClient_4 CtxTestClient
    31  )
    32  
    33  func GetCtxTestClient() CtxTestClient { 
    34      if client_CtxTestClient_4 != nil {
    35          return client_CtxTestClient_4
    36      }
    37  
    38      lock_CtxTestClient_4.Lock() 
    39      if client_CtxTestClient_4 != nil {
    40         lock_CtxTestClient_4.Unlock()
    41         return client_CtxTestClient_4
    42      }
    43  
    44      client_CtxTestClient_4 = NewCtxTestClient(client.Connect(CtxTestLookupID()))
    45      lock_CtxTestClient_4.Unlock()
    46      return client_CtxTestClient_4
    47  }
    48  
    49  func CtxTestLookupID() string { return "getestservice.CtxTest" } // returns the ID suitable for lookup in the registry. treat as opaque, subject to change.
    50  
    51  func init() {
    52     client.RegisterDependency("getestservice.CtxTest")
    53     AddService("getestservice.CtxTest")
    54  }
    55  

View as plain text