Getting a cacheable kubernetes.InterfaceCaching user data to avoid excess database tripsCacheManager.getCacheFileBaseDir() always returns nullWhat the best way (or standard practice) to organize the cache in RESTfull api and reduce load on a server?Blank cache entry after asynchronous JavaScript load in IE8Caching of nested cacheable operation via SpringCacheUnderstanding the Logic of Kubernetes API framework in GoKubernetes Controller - Unable to find v1.Node resourceAssign additional field when unmarshalling JSON object to GO structWhat's the best way to get notified when kubernetes Deployments change using the k8s.io/client-go library?In Cluster Config is unable to get pods when deployed in a non-default namespace

ssTTsSTtRrriinInnnnNNNIiinngg

Should I tell management that I intend to leave due to bad software development practices?

Why was the shrink from 8″ made only to 5.25″ and not smaller (4″ or less)

What is required to make GPS signals available indoors?

What Exploit Are These User Agents Trying to Use?

OP Amp not amplifying audio signal

Rotate ASCII Art by 45 Degrees

Where would I need my direct neural interface to be implanted?

What does the same-ish mean?

What are the G forces leaving Earth orbit?

Is this draw by repetition?

How can saying a song's name be a copyright violation?

What is a Samsaran Word™?

Getting extremely large arrows with tikzcd

What is an equivalently powerful replacement spell for the Yuan-Ti's Suggestion spell?

Placement of More Information/Help Icon button for Radio Buttons

How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?

Using "tail" to follow a file without displaying the most recent lines

What is the most common color to indicate the input-field is disabled?

How seriously should I take size and weight limits of hand luggage?

Venezuelan girlfriend wants to travel the USA to be with me. What is the process?

How can I prove that a state of equilibrium is unstable?

Am I breaking OOP practice with this architecture?

How to compactly explain secondary and tertiary characters without resorting to stereotypes?



Getting a cacheable kubernetes.Interface


Caching user data to avoid excess database tripsCacheManager.getCacheFileBaseDir() always returns nullWhat the best way (or standard practice) to organize the cache in RESTfull api and reduce load on a server?Blank cache entry after asynchronous JavaScript load in IE8Caching of nested cacheable operation via SpringCacheUnderstanding the Logic of Kubernetes API framework in GoKubernetes Controller - Unable to find v1.Node resourceAssign additional field when unmarshalling JSON object to GO structWhat's the best way to get notified when kubernetes Deployments change using the k8s.io/client-go library?In Cluster Config is unable to get pods when deployed in a non-default namespace













0















I currently have a function that gives me a kubernetes.Interface object that I use extensively.



func getClusterHandle(restConfig *rest.Config) (kubernetes.Interface, error) 
clientset, err := kubernetes.NewForConfig(restConfig)
if err != nil
return nil, errors.Wrap(err, "Could not create kubernetes clientset")


return clientset, nil



I want to use k8s.io/client-go/tools/cache somehow, but I'm a little lost.



I seem to be able to use NewFilteredListWatchFromClient and create an Informer via NewSharedInformer.



kubernetes.New takes a rest.Interface as an argument, and presumably if I could get something compatible out of the Informer, this whole thing might just work. But here's where I run out of road.



Thoughts?



Examples?










share|improve this question




























    0















    I currently have a function that gives me a kubernetes.Interface object that I use extensively.



    func getClusterHandle(restConfig *rest.Config) (kubernetes.Interface, error) 
    clientset, err := kubernetes.NewForConfig(restConfig)
    if err != nil
    return nil, errors.Wrap(err, "Could not create kubernetes clientset")


    return clientset, nil



    I want to use k8s.io/client-go/tools/cache somehow, but I'm a little lost.



    I seem to be able to use NewFilteredListWatchFromClient and create an Informer via NewSharedInformer.



    kubernetes.New takes a rest.Interface as an argument, and presumably if I could get something compatible out of the Informer, this whole thing might just work. But here's where I run out of road.



    Thoughts?



    Examples?










    share|improve this question


























      0












      0








      0


      1






      I currently have a function that gives me a kubernetes.Interface object that I use extensively.



      func getClusterHandle(restConfig *rest.Config) (kubernetes.Interface, error) 
      clientset, err := kubernetes.NewForConfig(restConfig)
      if err != nil
      return nil, errors.Wrap(err, "Could not create kubernetes clientset")


      return clientset, nil



      I want to use k8s.io/client-go/tools/cache somehow, but I'm a little lost.



      I seem to be able to use NewFilteredListWatchFromClient and create an Informer via NewSharedInformer.



      kubernetes.New takes a rest.Interface as an argument, and presumably if I could get something compatible out of the Informer, this whole thing might just work. But here's where I run out of road.



      Thoughts?



      Examples?










      share|improve this question
















      I currently have a function that gives me a kubernetes.Interface object that I use extensively.



      func getClusterHandle(restConfig *rest.Config) (kubernetes.Interface, error) 
      clientset, err := kubernetes.NewForConfig(restConfig)
      if err != nil
      return nil, errors.Wrap(err, "Could not create kubernetes clientset")


      return clientset, nil



      I want to use k8s.io/client-go/tools/cache somehow, but I'm a little lost.



      I seem to be able to use NewFilteredListWatchFromClient and create an Informer via NewSharedInformer.



      kubernetes.New takes a rest.Interface as an argument, and presumably if I could get something compatible out of the Informer, this whole thing might just work. But here's where I run out of road.



      Thoughts?



      Examples?







      go caching kubernetes client-go






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 21 at 20:48







      Michael

















      asked Mar 21 at 20:42









      MichaelMichael

      283




      283






















          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55288938%2fgetting-a-cacheable-kubernetes-interface%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55288938%2fgetting-a-cacheable-kubernetes-interface%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript