Documentation

Index

Constants

This section is empty.

Variables

View Source
var OnOff_name = map[int32]string{
	0: "OnOffReserved",
	1: "On",
	2: "Off",
}
View Source
var OnOff_value = map[string]int32{
	"OnOffReserved": 0,
	"On":            1,
	"Off":           2,
}
View Source
var Presence_name = map[int32]string{
	0: "PresenceReserved",
	1: "Present",
	2: "Absent",
}
View Source
var Presence_value = map[string]int32{
	"PresenceReserved": 0,
	"Present":          1,
	"Absent":           2,
}
View Source
var UpDown_name = map[int32]string{
	0: "UpDownReserved",
	1: "Up",
	2: "Down",
}
View Source
var UpDown_value = map[string]int32{
	"UpDownReserved": 0,
	"Up":             1,
	"Down":           2,
}
View Source
var Version = "undefined"

    set by makefile at link time

    Functions

    func Any

    func Any(*Element) bool

    func ClearPending

    func ClearPending() error

    func ErrorE

    func ErrorE(message string, err error) error

    func ErrorEF

    func ErrorEF(message string, err error, fields log.Fields) error

    func ListPorts

    func ListPorts(hosts []string) (map[string][]*Element, error)

    func LoadPendingCommands

    func LoadPendingCommands(cli *Client) error

    func LoadPendingQueries

    func LoadPendingQueries(cli *Client) error

    func RegisterCanopyServer

    func RegisterCanopyServer(s *grpc.Server, srv CanopyServer)

    func SendSet

    func SendSet(host string, set *SetRequest) error

    func SetAccess

    func SetAccess(name string, value *Access) error

    func SetBridgePresence

    func SetBridgePresence(name string, value Presence) error

    func SetLearning

    func SetLearning(name string, value OnOff) error
    func SetLink(name string, value UpDown) error

    func SetMaster

    func SetMaster(name string, master *Master) error

    func SetMtu

    func SetMtu(name string, value int32) error

    func SetTagged

    func SetTagged(name string, value *Tagged) error

    func SetUntagged

    func SetUntagged(name string, value *Untagged) error

    func SetVlanAware

    func SetVlanAware(name string, value bool) error

    func SetVtepPresence

    func SetVtepPresence(name string, vtep *VtepPresence) error

    func ShowErrors

    func ShowErrors(errors map[string]error)

    func ShowResult

    func ShowResult(data interface{})

    Types

    type Access

    type Access struct {
    	Presence             Presence `protobuf:"varint,1,opt,name=presence,proto3,enum=canopy.Presence" json:"presence,omitempty"`
    	Vid                  int32    `protobuf:"varint,2,opt,name=vid,proto3" json:"vid,omitempty"`
    	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
    	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
    	XXX_sizecache        int32    `json:"-" yaml:"-"`
    }

    func (*Access) Descriptor

    func (*Access) Descriptor() ([]byte, []int)

    func (*Access) GetPresence

    func (m *Access) GetPresence() Presence

    func (*Access) GetVid

    func (m *Access) GetVid() int32

    func (*Access) ProtoMessage

    func (*Access) ProtoMessage()

    func (*Access) Reset

    func (m *Access) Reset()

    func (*Access) String

    func (m *Access) String() string

    func (*Access) XXX_DiscardUnknown

    func (m *Access) XXX_DiscardUnknown()

    func (*Access) XXX_Marshal

    func (m *Access) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

    func (*Access) XXX_Merge

    func (m *Access) XXX_Merge(src proto.Message)

    func (*Access) XXX_Size

    func (m *Access) XXX_Size() int

    func (*Access) XXX_Unmarshal

    func (m *Access) XXX_Unmarshal(b []byte) error

    type Bridge

    type Bridge struct {
    	State                UpDown   `protobuf:"varint,1,opt,name=state,proto3,enum=canopy.UpDown" json:"state,omitempty"`
    	VlanAware            bool     `protobuf:"varint,2,opt,name=vlan_aware,json=vlanAware,proto3" json:"vlan_aware,omitempty"`
    	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
    	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
    	XXX_sizecache        int32    `json:"-" yaml:"-"`
    }

    func (*Bridge) Descriptor

    func (*Bridge) Descriptor() ([]byte, []int)

    func (*Bridge) GetState

    func (m *Bridge) GetState() UpDown

    func (*Bridge) GetVlanAware

    func (m *Bridge) GetVlanAware() bool

    func (*Bridge) ProtoMessage

    func (*Bridge) ProtoMessage()

    func (*Bridge) Reset

    func (m *Bridge) Reset()

    func (*Bridge) String

    func (m *Bridge) String() string

    func (*Bridge) XXX_DiscardUnknown

    func (m *Bridge) XXX_DiscardUnknown()

    func (*Bridge) XXX_Marshal

    func (m *Bridge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

    func (*Bridge) XXX_Merge

    func (m *Bridge) XXX_Merge(src proto.Message)

    func (*Bridge) XXX_Size

    func (m *Bridge) XXX_Size() int

    func (*Bridge) XXX_Unmarshal

    func (m *Bridge) XXX_Unmarshal(b []byte) error

    type BridgePresence

    type BridgePresence struct {
    	Presence             Presence `protobuf:"varint,1,opt,name=presence,proto3,enum=canopy.Presence" json:"presence,omitempty"`
    	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
    	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
    	XXX_sizecache        int32    `json:"-" yaml:"-"`
    }

    func (*BridgePresence) Descriptor

    func (*BridgePresence) Descriptor() ([]byte, []int)

    func (*BridgePresence) GetPresence

    func (m *BridgePresence) GetPresence() Presence

    func (*BridgePresence) ProtoMessage

    func (*BridgePresence) ProtoMessage()

    func (*BridgePresence) Reset

    func (m *BridgePresence) Reset()

    func (*BridgePresence) String

    func (m *BridgePresence) String() string

    func (*BridgePresence) XXX_DiscardUnknown

    func (m *BridgePresence) XXX_DiscardUnknown()

    func (*BridgePresence) XXX_Marshal

    func (m *BridgePresence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

    func (*BridgePresence) XXX_Merge

    func (m *BridgePresence) XXX_Merge(src proto.Message)

    func (*BridgePresence) XXX_Size

    func (m *BridgePresence) XXX_Size() int

    func (*BridgePresence) XXX_Unmarshal

    func (m *BridgePresence) XXX_Unmarshal(b []byte) error

    type CanopyClient

    type CanopyClient interface {
    	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
    	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
    	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
    }

      CanopyClient is the client API for Canopy service.

      For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

      func NewCanopyClient

      func NewCanopyClient(cc *grpc.ClientConn) CanopyClient

      type CanopyServer

      type CanopyServer interface {
      	List(context.Context, *ListRequest) (*ListResponse, error)
      	Set(context.Context, *SetRequest) (*SetResponse, error)
      	Get(context.Context, *GetRequest) (*GetResponse, error)
      }

        CanopyServer is the server API for Canopy service.

        type Client

        type Client struct {
        	Counter  int
        	Pending  CommandSet
        	Queries  QuerySet
        	Elements Elements
        }

        func LoadClient

        func LoadClient() (*Client, error)

        func NewClient

        func NewClient() *Client

        func (*Client) Add

        func (c *Client) Add(property *Property, host string) *Client

        func (*Client) AddMany

        func (c *Client) AddMany(property *Property, names, hosts []string) *Client

        func (*Client) Commit

        func (c *Client) Commit() error

        func (*Client) GetPort

        func (c *Client) GetPort(name, host string) *Client

        func (*Client) GetPorts

        func (c *Client) GetPorts(names []string, host string) *Client

        func (*Client) Query

        func (c *Client) Query() error

        func (*Client) SavePending

        func (c *Client) SavePending() error

        func (*Client) SavePendingCommands

        func (c *Client) SavePendingCommands() error

        func (*Client) SavePendingQueries

        func (c *Client) SavePendingQueries() error

        func (*Client) SetAccessPort

        func (c *Client) SetAccessPort(value *Access, name, host string) *Client

        func (*Client) SetAccessPorts

        func (c *Client) SetAccessPorts(value *Access, names, hosts []string) *Client

        func (*Client) SetBridgePresent

        func (c *Client) SetBridgePresent(p Presence, name, host string) *Client

        func (*Client) SetBridgesPresent

        func (c *Client) SetBridgesPresent(p Presence, names, hosts []string) *Client

        func (*Client) SetLearningVtep

        func (c *Client) SetLearningVtep(value OnOff, name, host string) *Client

        func (*Client) SetLearningVteps

        func (c *Client) SetLearningVteps(value OnOff, names, hosts []string) *Client
        func (c *Client) SetLink(value UpDown, name, host string) *Client
        func (c *Client) SetLinks(value UpDown, names, hosts []string) *Client

        func (*Client) SetMaster

        func (c *Client) SetMaster(value *Master, name, host string) *Client

        func (*Client) SetMasters

        func (c *Client) SetMasters(value *Master, names, hosts []string) *Client

        func (*Client) SetMtu

        func (c *Client) SetMtu(value int32, name, host string) *Client

        func (*Client) SetMtus

        func (c *Client) SetMtus(value int32, names, hosts []string) *Client

        func (*Client) SetTaggedPort

        func (c *Client) SetTaggedPort(value *Tagged, name, host string) *Client

        func (*Client) SetTaggedPorts

        func (c *Client) SetTaggedPorts(value *Tagged, names, hosts []string) *Client

        func (*Client) SetUntaggedPort

        func (c *Client) SetUntaggedPort(value *Untagged, name, host string) *Client

        func (*Client) SetUntaggedPorts

        func (c *Client) SetUntaggedPorts(value *Untagged, names, hosts []string) *Client

        func (*Client) SetVlanAwareBridge

        func (c *Client) SetVlanAwareBridge(v bool, name, host string) *Client

        func (*Client) SetVlanAwareBridges

        func (c *Client) SetVlanAwareBridges(v bool, names, hosts []string) *Client

        func (*Client) SetVtep

        func (c *Client) SetVtep(v *VtepPresence, name, host string) *Client

        func (*Client) SetVteps

        func (c *Client) SetVteps(v *VtepPresence, names, hosts []string) *Client

        type CommandSet

        type CommandSet map[string]map[string][]*Property

          hosts[id][port][]Elements

          type Config

          type Config struct {
          	Switches []string
          }

          func ReadConfig

          func ReadConfig() (*Config, error)

          type Element

          type Element struct {
          	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
          	// Types that are valid to be assigned to Value:
          	//	*Element_Port
          	//	*Element_Vtep
          	//	*Element_Bridge
          	Value                isElement_Value `protobuf_oneof:"value"`
          	XXX_NoUnkeyedLiteral struct{}        `json:"-" yaml:"-"`
          	XXX_unrecognized     []byte          `json:"-" yaml:"-"`
          	XXX_sizecache        int32           `json:"-" yaml:"-"`
          }

          func List

          func List(filter func(e *Element) bool) ([]*Element, error)

          func SendGet

          func SendGet(host string, ports []string) ([]*Element, error)

          func (*Element) Descriptor

          func (*Element) Descriptor() ([]byte, []int)

          func (*Element) GetBridge

          func (m *Element) GetBridge() *Bridge

          func (*Element) GetName

          func (m *Element) GetName() string

          func (*Element) GetPort

          func (m *Element) GetPort() *Port

          func (*Element) GetValue

          func (m *Element) GetValue() isElement_Value

          func (*Element) GetVtep

          func (m *Element) GetVtep() *Vtep

          func (*Element) ProtoMessage

          func (*Element) ProtoMessage()

          func (*Element) Reset

          func (m *Element) Reset()

          func (*Element) String

          func (m *Element) String() string

          func (*Element) XXX_DiscardUnknown

          func (m *Element) XXX_DiscardUnknown()

          func (*Element) XXX_Marshal

          func (m *Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

          func (*Element) XXX_Merge

          func (m *Element) XXX_Merge(src proto.Message)

          func (*Element) XXX_OneofWrappers

          func (*Element) XXX_OneofWrappers() []interface{}

            XXX_OneofWrappers is for the internal use of the proto package.

            func (*Element) XXX_Size

            func (m *Element) XXX_Size() int

            func (*Element) XXX_Unmarshal

            func (m *Element) XXX_Unmarshal(b []byte) error

            type Element_Bridge

            type Element_Bridge struct {
            	Bridge *Bridge `protobuf:"bytes,4,opt,name=bridge,proto3,oneof"`
            }

            type Element_Port

            type Element_Port struct {
            	Port *Port `protobuf:"bytes,2,opt,name=port,proto3,oneof"`
            }

            type Element_Vtep

            type Element_Vtep struct {
            	Vtep *Vtep `protobuf:"bytes,3,opt,name=vtep,proto3,oneof"`
            }

            type Elements

            type Elements map[string]map[string]*Element

            func (Elements) Set

            func (es Elements) Set(host, port string, e *Element)

            type GetRequest

            type GetRequest struct {
            	Names                []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
            	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
            	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
            	XXX_sizecache        int32    `json:"-" yaml:"-"`
            }

            func (*GetRequest) Descriptor

            func (*GetRequest) Descriptor() ([]byte, []int)

            func (*GetRequest) GetNames

            func (m *GetRequest) GetNames() []string

            func (*GetRequest) ProtoMessage

            func (*GetRequest) ProtoMessage()

            func (*GetRequest) Reset

            func (m *GetRequest) Reset()

            func (*GetRequest) String

            func (m *GetRequest) String() string

            func (*GetRequest) XXX_DiscardUnknown

            func (m *GetRequest) XXX_DiscardUnknown()

            func (*GetRequest) XXX_Marshal

            func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

            func (*GetRequest) XXX_Merge

            func (m *GetRequest) XXX_Merge(src proto.Message)

            func (*GetRequest) XXX_Size

            func (m *GetRequest) XXX_Size() int

            func (*GetRequest) XXX_Unmarshal

            func (m *GetRequest) XXX_Unmarshal(b []byte) error

            type GetResponse

            type GetResponse struct {
            	Elements             []*Element `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"`
            	XXX_NoUnkeyedLiteral struct{}   `json:"-" yaml:"-"`
            	XXX_unrecognized     []byte     `json:"-" yaml:"-"`
            	XXX_sizecache        int32      `json:"-" yaml:"-"`
            }

            func (*GetResponse) Descriptor

            func (*GetResponse) Descriptor() ([]byte, []int)

            func (*GetResponse) GetElements

            func (m *GetResponse) GetElements() []*Element

            func (*GetResponse) ProtoMessage

            func (*GetResponse) ProtoMessage()

            func (*GetResponse) Reset

            func (m *GetResponse) Reset()

            func (*GetResponse) String

            func (m *GetResponse) String() string

            func (*GetResponse) XXX_DiscardUnknown

            func (m *GetResponse) XXX_DiscardUnknown()

            func (*GetResponse) XXX_Marshal

            func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

            func (*GetResponse) XXX_Merge

            func (m *GetResponse) XXX_Merge(src proto.Message)

            func (*GetResponse) XXX_Size

            func (m *GetResponse) XXX_Size() int

            func (*GetResponse) XXX_Unmarshal

            func (m *GetResponse) XXX_Unmarshal(b []byte) error

            type ListRequest

            type ListRequest struct {
            	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
            	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
            	XXX_sizecache        int32    `json:"-" yaml:"-"`
            }

            func (*ListRequest) Descriptor

            func (*ListRequest) Descriptor() ([]byte, []int)

            func (*ListRequest) ProtoMessage

            func (*ListRequest) ProtoMessage()

            func (*ListRequest) Reset

            func (m *ListRequest) Reset()

            func (*ListRequest) String

            func (m *ListRequest) String() string

            func (*ListRequest) XXX_DiscardUnknown

            func (m *ListRequest) XXX_DiscardUnknown()

            func (*ListRequest) XXX_Marshal

            func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

            func (*ListRequest) XXX_Merge

            func (m *ListRequest) XXX_Merge(src proto.Message)

            func (*ListRequest) XXX_Size

            func (m *ListRequest) XXX_Size() int

            func (*ListRequest) XXX_Unmarshal

            func (m *ListRequest) XXX_Unmarshal(b []byte) error

            type ListResponse

            type ListResponse struct {
            	Elements             []*Element `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"`
            	XXX_NoUnkeyedLiteral struct{}   `json:"-" yaml:"-"`
            	XXX_unrecognized     []byte     `json:"-" yaml:"-"`
            	XXX_sizecache        int32      `json:"-" yaml:"-"`
            }

            func (*ListResponse) Descriptor

            func (*ListResponse) Descriptor() ([]byte, []int)

            func (*ListResponse) GetElements

            func (m *ListResponse) GetElements() []*Element

            func (*ListResponse) ProtoMessage

            func (*ListResponse) ProtoMessage()

            func (*ListResponse) Reset

            func (m *ListResponse) Reset()

            func (*ListResponse) String

            func (m *ListResponse) String() string

            func (*ListResponse) XXX_DiscardUnknown

            func (m *ListResponse) XXX_DiscardUnknown()

            func (*ListResponse) XXX_Marshal

            func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

            func (*ListResponse) XXX_Merge

            func (m *ListResponse) XXX_Merge(src proto.Message)

            func (*ListResponse) XXX_Size

            func (m *ListResponse) XXX_Size() int

            func (*ListResponse) XXX_Unmarshal

            func (m *ListResponse) XXX_Unmarshal(b []byte) error

            type Master

            type Master struct {
            	Presence             Presence `protobuf:"varint,1,opt,name=presence,proto3,enum=canopy.Presence" json:"presence,omitempty"`
            	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
            	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
            	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
            	XXX_sizecache        int32    `json:"-" yaml:"-"`
            }

            func (*Master) Descriptor

            func (*Master) Descriptor() ([]byte, []int)

            func (*Master) GetPresence

            func (m *Master) GetPresence() Presence

            func (*Master) GetValue

            func (m *Master) GetValue() string

            func (*Master) ProtoMessage

            func (*Master) ProtoMessage()

            func (*Master) Reset

            func (m *Master) Reset()

            func (*Master) String

            func (m *Master) String() string

            func (*Master) XXX_DiscardUnknown

            func (m *Master) XXX_DiscardUnknown()

            func (*Master) XXX_Marshal

            func (m *Master) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

            func (*Master) XXX_Merge

            func (m *Master) XXX_Merge(src proto.Message)

            func (*Master) XXX_Size

            func (m *Master) XXX_Size() int

            func (*Master) XXX_Unmarshal

            func (m *Master) XXX_Unmarshal(b []byte) error

            type OnOff

            type OnOff int32
            const (
            	OnOff_OnOffReserved OnOff = 0
            	OnOff_On            OnOff = 1
            	OnOff_Off           OnOff = 2
            )

            func ParseOnOff

            func ParseOnOff(s string) (OnOff, error)

            func (OnOff) EnumDescriptor

            func (OnOff) EnumDescriptor() ([]byte, []int)

            func (OnOff) String

            func (x OnOff) String() string

            type Parent

            type Parent struct {
            	Presence             Presence `protobuf:"varint,1,opt,name=presence,proto3,enum=canopy.Presence" json:"presence,omitempty"`
            	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
            	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
            	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
            	XXX_sizecache        int32    `json:"-" yaml:"-"`
            }

            func (*Parent) Descriptor

            func (*Parent) Descriptor() ([]byte, []int)

            func (*Parent) GetPresence

            func (m *Parent) GetPresence() Presence

            func (*Parent) GetValue

            func (m *Parent) GetValue() string

            func (*Parent) ProtoMessage

            func (*Parent) ProtoMessage()

            func (*Parent) Reset

            func (m *Parent) Reset()

            func (*Parent) String

            func (m *Parent) String() string

            func (*Parent) XXX_DiscardUnknown

            func (m *Parent) XXX_DiscardUnknown()

            func (*Parent) XXX_Marshal

            func (m *Parent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

            func (*Parent) XXX_Merge

            func (m *Parent) XXX_Merge(src proto.Message)

            func (*Parent) XXX_Size

            func (m *Parent) XXX_Size() int

            func (*Parent) XXX_Unmarshal

            func (m *Parent) XXX_Unmarshal(b []byte) error

            type Port

            type Port struct {
            	State                UpDown   `protobuf:"varint,1,opt,name=state,proto3,enum=canopy.UpDown" json:"state,omitempty"`
            	Mtu                  int32    `protobuf:"varint,2,opt,name=mtu,proto3" json:"mtu,omitempty"`
            	Bridge               string   `protobuf:"bytes,3,opt,name=bridge,proto3" json:"bridge,omitempty"`
            	Access               int32    `protobuf:"varint,4,opt,name=access,proto3" json:"access,omitempty"`
            	Tagged               []int32  `protobuf:"varint,5,rep,packed,name=tagged,proto3" json:"tagged,omitempty"`
            	Untagged             []int32  `protobuf:"varint,6,rep,packed,name=untagged,proto3" json:"untagged,omitempty"`
            	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
            	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
            	XXX_sizecache        int32    `json:"-" yaml:"-"`
            }

            func (*Port) Descriptor

            func (*Port) Descriptor() ([]byte, []int)

            func (*Port) GetAccess

            func (m *Port) GetAccess() int32

            func (*Port) GetBridge

            func (m *Port) GetBridge() string

            func (*Port) GetMtu

            func (m *Port) GetMtu() int32

            func (*Port) GetState

            func (m *Port) GetState() UpDown

            func (*Port) GetTagged

            func (m *Port) GetTagged() []int32

            func (*Port) GetUntagged

            func (m *Port) GetUntagged() []int32

            func (*Port) ProtoMessage

            func (*Port) ProtoMessage()

            func (*Port) Reset

            func (m *Port) Reset()

            func (*Port) String

            func (m *Port) String() string

            func (*Port) XXX_DiscardUnknown

            func (m *Port) XXX_DiscardUnknown()

            func (*Port) XXX_Marshal

            func (m *Port) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

            func (*Port) XXX_Merge

            func (m *Port) XXX_Merge(src proto.Message)

            func (*Port) XXX_Size

            func (m *Port) XXX_Size() int

            func (*Port) XXX_Unmarshal

            func (m *Port) XXX_Unmarshal(b []byte) error

            type Presence

            type Presence int32
            const (
            	Presence_PresenceReserved Presence = 0
            	Presence_Present          Presence = 1
            	Presence_Absent           Presence = 2
            )

            func ParsePresence

            func ParsePresence(s string) (Presence, error)

            func (Presence) EnumDescriptor

            func (Presence) EnumDescriptor() ([]byte, []int)

            func (Presence) String

            func (x Presence) String() string

            type Property

            type Property struct {
            	Element string `protobuf:"bytes,1,opt,name=element,proto3" json:"element,omitempty"`
            	Order   int32  `protobuf:"varint,2,opt,name=order,proto3" json:"order,omitempty"`
            	// Types that are valid to be assigned to Value:
            	//	*Property_Link
            	//	*Property_Mtu
            	//	*Property_Access
            	//	*Property_Tagged
            	//	*Property_Untagged
            	//	*Property_Master
            	//	*Property_Vtep
            	//	*Property_Learning
            	//	*Property_Bridge
            	//	*Property_VlanAware
            	Value                isProperty_Value `protobuf_oneof:"value"`
            	XXX_NoUnkeyedLiteral struct{}         `json:"-" yaml:"-"`
            	XXX_unrecognized     []byte           `json:"-" yaml:"-"`
            	XXX_sizecache        int32            `json:"-" yaml:"-"`
            }

            func (*Property) Descriptor

            func (*Property) Descriptor() ([]byte, []int)

            func (*Property) GetAccess

            func (m *Property) GetAccess() *Access

            func (*Property) GetBridge

            func (m *Property) GetBridge() Presence

            func (*Property) GetElement

            func (m *Property) GetElement() string

            func (*Property) GetLearning

            func (m *Property) GetLearning() OnOff
            func (m *Property) GetLink() UpDown

            func (*Property) GetMaster

            func (m *Property) GetMaster() *Master

            func (*Property) GetMtu

            func (m *Property) GetMtu() int32

            func (*Property) GetOrder

            func (m *Property) GetOrder() int32

            func (*Property) GetTagged

            func (m *Property) GetTagged() *Tagged

            func (*Property) GetUntagged

            func (m *Property) GetUntagged() *Untagged

            func (*Property) GetValue

            func (m *Property) GetValue() isProperty_Value

            func (*Property) GetVlanAware

            func (m *Property) GetVlanAware() bool

            func (*Property) GetVtep

            func (m *Property) GetVtep() *VtepPresence

            func (*Property) ProtoMessage

            func (*Property) ProtoMessage()

            func (*Property) Reset

            func (m *Property) Reset()

            func (*Property) String

            func (m *Property) String() string

            func (*Property) XXX_DiscardUnknown

            func (m *Property) XXX_DiscardUnknown()

            func (*Property) XXX_Marshal

            func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

            func (*Property) XXX_Merge

            func (m *Property) XXX_Merge(src proto.Message)

            func (*Property) XXX_OneofWrappers

            func (*Property) XXX_OneofWrappers() []interface{}

              XXX_OneofWrappers is for the internal use of the proto package.

              func (*Property) XXX_Size

              func (m *Property) XXX_Size() int

              func (*Property) XXX_Unmarshal

              func (m *Property) XXX_Unmarshal(b []byte) error

              type Property_Access

              type Property_Access struct {
              	Access *Access `protobuf:"bytes,5,opt,name=access,proto3,oneof"`
              }

              type Property_Bridge

              type Property_Bridge struct {
              	Bridge Presence `protobuf:"varint,11,opt,name=bridge,proto3,enum=canopy.Presence,oneof"`
              }

              type Property_Learning

              type Property_Learning struct {
              	Learning OnOff `protobuf:"varint,10,opt,name=learning,proto3,enum=canopy.OnOff,oneof"`
              }
              type Property_Link struct {
              	Link UpDown `protobuf:"varint,3,opt,name=link,proto3,enum=canopy.UpDown,oneof"`
              }

              type Property_Master

              type Property_Master struct {
              	Master *Master `protobuf:"bytes,8,opt,name=master,proto3,oneof"`
              }

              type Property_Mtu

              type Property_Mtu struct {
              	Mtu int32 `protobuf:"varint,4,opt,name=mtu,proto3,oneof"`
              }

              type Property_Tagged

              type Property_Tagged struct {
              	Tagged *Tagged `protobuf:"bytes,6,opt,name=tagged,proto3,oneof"`
              }

              type Property_Untagged

              type Property_Untagged struct {
              	Untagged *Untagged `protobuf:"bytes,7,opt,name=untagged,proto3,oneof"`
              }

              type Property_VlanAware

              type Property_VlanAware struct {
              	VlanAware bool `protobuf:"varint,12,opt,name=vlan_aware,json=vlanAware,proto3,oneof"`
              }

              type Property_Vtep

              type Property_Vtep struct {
              	Vtep *VtepPresence `protobuf:"bytes,9,opt,name=vtep,proto3,oneof"`
              }

              type QuerySet

              type QuerySet map[string][]string

                hosts[id][]port

                type Server

                type Server struct {
                	// contains filtered or unexported fields
                }

                func (*Server) Get

                func (s *Server) Get(ctx context.Context, req *GetRequest) (
                	*GetResponse, error)

                  Implements Canopy::Get gRPC interface

                  func (*Server) List

                  func (s *Server) List(ctx context.Context, req *ListRequest) (
                  	*ListResponse, error)

                  func (*Server) Run

                  func (s *Server) Run()

                    Starts the canopy server and listens for requests.

                    func (*Server) Set

                    func (s *Server) Set(ctx context.Context, req *SetRequest) (
                    	*SetResponse, error)

                      Implements Canopy::Set gRPC interface

                      type SetRequest

                      type SetRequest struct {
                      	Properties           []*Property `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"`
                      	XXX_NoUnkeyedLiteral struct{}    `json:"-" yaml:"-"`
                      	XXX_unrecognized     []byte      `json:"-" yaml:"-"`
                      	XXX_sizecache        int32       `json:"-" yaml:"-"`
                      }

                      func (*SetRequest) Descriptor

                      func (*SetRequest) Descriptor() ([]byte, []int)

                      func (*SetRequest) GetProperties

                      func (m *SetRequest) GetProperties() []*Property

                      func (*SetRequest) ProtoMessage

                      func (*SetRequest) ProtoMessage()

                      func (*SetRequest) Reset

                      func (m *SetRequest) Reset()

                      func (*SetRequest) String

                      func (m *SetRequest) String() string

                      func (*SetRequest) XXX_DiscardUnknown

                      func (m *SetRequest) XXX_DiscardUnknown()

                      func (*SetRequest) XXX_Marshal

                      func (m *SetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

                      func (*SetRequest) XXX_Merge

                      func (m *SetRequest) XXX_Merge(src proto.Message)

                      func (*SetRequest) XXX_Size

                      func (m *SetRequest) XXX_Size() int

                      func (*SetRequest) XXX_Unmarshal

                      func (m *SetRequest) XXX_Unmarshal(b []byte) error

                      type SetResponse

                      type SetResponse struct {
                      	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
                      	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
                      	XXX_sizecache        int32    `json:"-" yaml:"-"`
                      }

                      func (*SetResponse) Descriptor

                      func (*SetResponse) Descriptor() ([]byte, []int)

                      func (*SetResponse) ProtoMessage

                      func (*SetResponse) ProtoMessage()

                      func (*SetResponse) Reset

                      func (m *SetResponse) Reset()

                      func (*SetResponse) String

                      func (m *SetResponse) String() string

                      func (*SetResponse) XXX_DiscardUnknown

                      func (m *SetResponse) XXX_DiscardUnknown()

                      func (*SetResponse) XXX_Marshal

                      func (m *SetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

                      func (*SetResponse) XXX_Merge

                      func (m *SetResponse) XXX_Merge(src proto.Message)

                      func (*SetResponse) XXX_Size

                      func (m *SetResponse) XXX_Size() int

                      func (*SetResponse) XXX_Unmarshal

                      func (m *SetResponse) XXX_Unmarshal(b []byte) error

                      type Tagged

                      type Tagged struct {
                      	Presence             Presence `protobuf:"varint,1,opt,name=presence,proto3,enum=canopy.Presence" json:"presence,omitempty"`
                      	Vids                 []int32  `protobuf:"varint,2,rep,packed,name=vids,proto3" json:"vids,omitempty"`
                      	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
                      	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
                      	XXX_sizecache        int32    `json:"-" yaml:"-"`
                      }

                      func (*Tagged) Descriptor

                      func (*Tagged) Descriptor() ([]byte, []int)

                      func (*Tagged) GetPresence

                      func (m *Tagged) GetPresence() Presence

                      func (*Tagged) GetVids

                      func (m *Tagged) GetVids() []int32

                      func (*Tagged) ProtoMessage

                      func (*Tagged) ProtoMessage()

                      func (*Tagged) Reset

                      func (m *Tagged) Reset()

                      func (*Tagged) String

                      func (m *Tagged) String() string

                      func (*Tagged) XXX_DiscardUnknown

                      func (m *Tagged) XXX_DiscardUnknown()

                      func (*Tagged) XXX_Marshal

                      func (m *Tagged) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

                      func (*Tagged) XXX_Merge

                      func (m *Tagged) XXX_Merge(src proto.Message)

                      func (*Tagged) XXX_Size

                      func (m *Tagged) XXX_Size() int

                      func (*Tagged) XXX_Unmarshal

                      func (m *Tagged) XXX_Unmarshal(b []byte) error

                      type UnimplementedCanopyServer

                      type UnimplementedCanopyServer struct {
                      }

                        UnimplementedCanopyServer can be embedded to have forward compatible implementations.

                        func (*UnimplementedCanopyServer) Get

                        func (*UnimplementedCanopyServer) List

                        func (*UnimplementedCanopyServer) Set

                        type Untagged

                        type Untagged struct {
                        	Presence             Presence `protobuf:"varint,1,opt,name=presence,proto3,enum=canopy.Presence" json:"presence,omitempty"`
                        	Vids                 []int32  `protobuf:"varint,2,rep,packed,name=vids,proto3" json:"vids,omitempty"`
                        	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
                        	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
                        	XXX_sizecache        int32    `json:"-" yaml:"-"`
                        }

                        func (*Untagged) Descriptor

                        func (*Untagged) Descriptor() ([]byte, []int)

                        func (*Untagged) GetPresence

                        func (m *Untagged) GetPresence() Presence

                        func (*Untagged) GetVids

                        func (m *Untagged) GetVids() []int32

                        func (*Untagged) ProtoMessage

                        func (*Untagged) ProtoMessage()

                        func (*Untagged) Reset

                        func (m *Untagged) Reset()

                        func (*Untagged) String

                        func (m *Untagged) String() string

                        func (*Untagged) XXX_DiscardUnknown

                        func (m *Untagged) XXX_DiscardUnknown()

                        func (*Untagged) XXX_Marshal

                        func (m *Untagged) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

                        func (*Untagged) XXX_Merge

                        func (m *Untagged) XXX_Merge(src proto.Message)

                        func (*Untagged) XXX_Size

                        func (m *Untagged) XXX_Size() int

                        func (*Untagged) XXX_Unmarshal

                        func (m *Untagged) XXX_Unmarshal(b []byte) error

                        type UpDown

                        type UpDown int32
                        const (
                        	UpDown_UpDownReserved UpDown = 0
                        	UpDown_Up             UpDown = 1
                        	UpDown_Down           UpDown = 2
                        )

                        func ParseLinkState

                        func ParseLinkState(s string) (UpDown, error)

                        func (UpDown) EnumDescriptor

                        func (UpDown) EnumDescriptor() ([]byte, []int)

                        func (UpDown) String

                        func (x UpDown) String() string

                        type VlanAware

                        type VlanAware struct {
                        	Value                bool     `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
                        	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
                        	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
                        	XXX_sizecache        int32    `json:"-" yaml:"-"`
                        }

                        func (*VlanAware) Descriptor

                        func (*VlanAware) Descriptor() ([]byte, []int)

                        func (*VlanAware) GetValue

                        func (m *VlanAware) GetValue() bool

                        func (*VlanAware) ProtoMessage

                        func (*VlanAware) ProtoMessage()

                        func (*VlanAware) Reset

                        func (m *VlanAware) Reset()

                        func (*VlanAware) String

                        func (m *VlanAware) String() string

                        func (*VlanAware) XXX_DiscardUnknown

                        func (m *VlanAware) XXX_DiscardUnknown()

                        func (*VlanAware) XXX_Marshal

                        func (m *VlanAware) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

                        func (*VlanAware) XXX_Merge

                        func (m *VlanAware) XXX_Merge(src proto.Message)

                        func (*VlanAware) XXX_Size

                        func (m *VlanAware) XXX_Size() int

                        func (*VlanAware) XXX_Unmarshal

                        func (m *VlanAware) XXX_Unmarshal(b []byte) error

                        type Vtep

                        type Vtep struct {
                        	State                UpDown   `protobuf:"varint,1,opt,name=state,proto3,enum=canopy.UpDown" json:"state,omitempty"`
                        	Vni                  int32    `protobuf:"varint,2,opt,name=vni,proto3" json:"vni,omitempty"`
                        	BridgeAccess         int32    `protobuf:"varint,3,opt,name=bridge_access,json=bridgeAccess,proto3" json:"bridge_access,omitempty"`
                        	Device               string   `protobuf:"bytes,4,opt,name=device,proto3" json:"device,omitempty"`
                        	Bridge               string   `protobuf:"bytes,5,opt,name=bridge,proto3" json:"bridge,omitempty"`
                        	Learning             OnOff    `protobuf:"varint,6,opt,name=learning,proto3,enum=canopy.OnOff" json:"learning,omitempty"`
                        	LocalIP              string   `protobuf:"bytes,7,opt,name=localIP,proto3" json:"localIP,omitempty"`
                        	Mtu                  int32    `protobuf:"varint,8,opt,name=mtu,proto3" json:"mtu,omitempty"`
                        	Access               int32    `protobuf:"varint,9,opt,name=access,proto3" json:"access,omitempty"`
                        	Tagged               []int32  `protobuf:"varint,10,rep,packed,name=tagged,proto3" json:"tagged,omitempty"`
                        	Untagged             []int32  `protobuf:"varint,11,rep,packed,name=untagged,proto3" json:"untagged,omitempty"`
                        	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
                        	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
                        	XXX_sizecache        int32    `json:"-" yaml:"-"`
                        }

                        func (*Vtep) Descriptor

                        func (*Vtep) Descriptor() ([]byte, []int)

                        func (*Vtep) GetAccess

                        func (m *Vtep) GetAccess() int32

                        func (*Vtep) GetBridge

                        func (m *Vtep) GetBridge() string

                        func (*Vtep) GetBridgeAccess

                        func (m *Vtep) GetBridgeAccess() int32

                        func (*Vtep) GetDevice

                        func (m *Vtep) GetDevice() string

                        func (*Vtep) GetLearning

                        func (m *Vtep) GetLearning() OnOff

                        func (*Vtep) GetLocalIP

                        func (m *Vtep) GetLocalIP() string

                        func (*Vtep) GetMtu

                        func (m *Vtep) GetMtu() int32

                        func (*Vtep) GetState

                        func (m *Vtep) GetState() UpDown

                        func (*Vtep) GetTagged

                        func (m *Vtep) GetTagged() []int32

                        func (*Vtep) GetUntagged

                        func (m *Vtep) GetUntagged() []int32

                        func (*Vtep) GetVni

                        func (m *Vtep) GetVni() int32

                        func (*Vtep) ProtoMessage

                        func (*Vtep) ProtoMessage()

                        func (*Vtep) Reset

                        func (m *Vtep) Reset()

                        func (*Vtep) String

                        func (m *Vtep) String() string

                        func (*Vtep) XXX_DiscardUnknown

                        func (m *Vtep) XXX_DiscardUnknown()

                        func (*Vtep) XXX_Marshal

                        func (m *Vtep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

                        func (*Vtep) XXX_Merge

                        func (m *Vtep) XXX_Merge(src proto.Message)

                        func (*Vtep) XXX_Size

                        func (m *Vtep) XXX_Size() int

                        func (*Vtep) XXX_Unmarshal

                        func (m *Vtep) XXX_Unmarshal(b []byte) error

                        type VtepPresence

                        type VtepPresence struct {
                        	Presence             Presence `protobuf:"varint,1,opt,name=presence,proto3,enum=canopy.Presence" json:"presence,omitempty"`
                        	Vni                  int32    `protobuf:"varint,2,opt,name=vni,proto3" json:"vni,omitempty"`
                        	TunnelIp             string   `protobuf:"bytes,3,opt,name=tunnel_ip,json=tunnelIp,proto3" json:"tunnel_ip,omitempty"`
                        	Parent               string   `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"`
                        	Learning             OnOff    `protobuf:"varint,5,opt,name=learning,proto3,enum=canopy.OnOff" json:"learning,omitempty"`
                        	XXX_NoUnkeyedLiteral struct{} `json:"-" yaml:"-"`
                        	XXX_unrecognized     []byte   `json:"-" yaml:"-"`
                        	XXX_sizecache        int32    `json:"-" yaml:"-"`
                        }

                        func (*VtepPresence) Descriptor

                        func (*VtepPresence) Descriptor() ([]byte, []int)

                        func (*VtepPresence) GetLearning

                        func (m *VtepPresence) GetLearning() OnOff

                        func (*VtepPresence) GetParent

                        func (m *VtepPresence) GetParent() string

                        func (*VtepPresence) GetPresence

                        func (m *VtepPresence) GetPresence() Presence

                        func (*VtepPresence) GetTunnelIp

                        func (m *VtepPresence) GetTunnelIp() string

                        func (*VtepPresence) GetVni

                        func (m *VtepPresence) GetVni() int32

                        func (*VtepPresence) ProtoMessage

                        func (*VtepPresence) ProtoMessage()

                        func (*VtepPresence) Reset

                        func (m *VtepPresence) Reset()

                        func (*VtepPresence) String

                        func (m *VtepPresence) String() string

                        func (*VtepPresence) XXX_DiscardUnknown

                        func (m *VtepPresence) XXX_DiscardUnknown()

                        func (*VtepPresence) XXX_Marshal

                        func (m *VtepPresence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

                        func (*VtepPresence) XXX_Merge

                        func (m *VtepPresence) XXX_Merge(src proto.Message)

                        func (*VtepPresence) XXX_Size

                        func (m *VtepPresence) XXX_Size() int

                        func (*VtepPresence) XXX_Unmarshal

                        func (m *VtepPresence) XXX_Unmarshal(b []byte) error