github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/pubsub/common/messages.go (about)

     1  // Copyright 2016 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package common
     5  
     6  // OriginTarget represents the commonly used message structure
     7  // where the publisher generally just specifies the Target and the
     8  // Origin is filled in by the hub.
     9  type OriginTarget struct {
    10  	// Origin represents this API server.
    11  	Origin string `yaml:"origin"`
    12  	// Target represents the other API server that this one is forwarding
    13  	// messages to.
    14  	Target string `yaml:"target"`
    15  }
    16  
    17  // LocalOnly represents a common structure where the subject is the
    18  // primary indicator and the message is local.
    19  type LocalOnly struct {
    20  	LocalOnly bool `yaml:"local-only"`
    21  }